File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 1
1
import findUp from 'find-up' ;
2
2
import execa from 'execa' ;
3
- import { dirname } from 'path' ;
3
+ import { dirname , join } from 'path' ;
4
+ import * as fs from 'fs' ;
4
5
5
6
export const name = 'git' ;
6
7
7
8
export const detect = directory => {
9
+ if ( fs . existsSync ( join ( directory , '.git' ) ) ) {
10
+ return directory ;
11
+ }
12
+
8
13
const gitDirectory = findUp . sync ( '.git' , {
9
14
cwd : directory ,
10
15
type : 'directory' ,
Original file line number Diff line number Diff line change 7
7
resolved "https://registry.yarnpkg.com/@azz/prettier-config/-/prettier-config-1.0.0.tgz#ecd38a9e4152fbd03043e020ee73cd14c0e3c112"
8
8
integrity sha512-2R3F5XWq8YoBXEbqjlraRt8c6Z8GnV4X/gOw0kAi9dn5aCCFHqqDuprQD0UBds4heH6tRp6ZGSeXyG6YZJUgAQ==
9
9
10
- " @babel/cli@^7.6 .4 " :
10
+ " @babel/cli@^7.6.4 " :
11
11
version "7.6.4"
12
12
resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.6.4.tgz#9b35a4e15fa7d8f487418aaa8229c8b0bc815f20"
13
13
integrity sha512-tqrDyvPryBM6xjIyKKUwr3s8CzmmYidwgdswd7Uc/Cv0ogZcuS1TYQTLx/eWKP3UbJ6JxZAiYlBZabXm/rtRsQ==
You can’t perform that action at this time.
0 commit comments