Skip to content

Commit

Permalink
fix: handling of submodules and .git path (#90) (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
cjanietz authored and azz committed Nov 5, 2019
1 parent 6862b20 commit 3370668
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/scms/git.js
@@ -1,10 +1,15 @@
import findUp from 'find-up';
import execa from 'execa';
import { dirname } from 'path';
import { dirname, join } from 'path';
import * as fs from 'fs';

export const name = 'git';

export const detect = directory => {
if (fs.existsSync(join(directory, '.git'))) {
return directory;
}

const gitDirectory = findUp.sync('.git', {
cwd: directory,
type: 'directory',
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Expand Up @@ -7,7 +7,7 @@
resolved "https://registry.yarnpkg.com/@azz/prettier-config/-/prettier-config-1.0.0.tgz#ecd38a9e4152fbd03043e020ee73cd14c0e3c112"
integrity sha512-2R3F5XWq8YoBXEbqjlraRt8c6Z8GnV4X/gOw0kAi9dn5aCCFHqqDuprQD0UBds4heH6tRp6ZGSeXyG6YZJUgAQ==

"@babel/cli@^7.6 .4":
"@babel/cli@^7.6.4":
version "7.6.4"
resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.6.4.tgz#9b35a4e15fa7d8f487418aaa8229c8b0bc815f20"
integrity sha512-tqrDyvPryBM6xjIyKKUwr3s8CzmmYidwgdswd7Uc/Cv0ogZcuS1TYQTLx/eWKP3UbJ6JxZAiYlBZabXm/rtRsQ==
Expand Down

0 comments on commit 3370668

Please sign in to comment.