File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -47,15 +47,15 @@ async function promptForMissingOptions(options) {
47
47
if ( ! options . git && ! options . dir ) {
48
48
49
49
// check if the current dir is a valid repo
50
- const git = simpleGit ( __dirname ) ;
50
+ const git = simpleGit ( process . cwd ( ) ) ;
51
51
const isRepo = await git . checkIsRepo ( ) ;
52
52
53
53
if ( ! isRepo ) {
54
54
55
55
questions . push ( {
56
56
type : 'list' ,
57
57
name : 'source' ,
58
- message : `The current directory (${ __dirname } ) is not a valid git repo. Would you like to provide a...` ,
58
+ message : `The current directory (${ process . cwd ( ) } ) is not a valid git repo. Would you like to provide a...` ,
59
59
choices : [ localGit , remoteGit ] ,
60
60
default : localGit ,
61
61
} ) ;
@@ -114,7 +114,7 @@ async function promptForMissingOptions(options) {
114
114
isLocal = answers . source === localGit ;
115
115
}
116
116
else {
117
- repo = options . dir || options . git || __dirname ;
117
+ repo = options . dir || options . git || process . cwd ( ) ;
118
118
isLocal = options . git ? false : true ;
119
119
}
120
120
You can’t perform that action at this time.
0 commit comments