We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parente8674d9 commita7f9c6aCopy full SHA for a7f9c6a
src/cli.js
@@ -47,15 +47,15 @@ async function promptForMissingOptions(options) {
47
if(!options.git&&!options.dir){
48
49
// check if the current dir is a valid repo
50
-constgit=simpleGit(__dirname);
+constgit=simpleGit(process.cwd());
51
constisRepo=awaitgit.checkIsRepo();
52
53
if(!isRepo){
54
55
questions.push({
56
type:'list',
57
name:'source',
58
-message:`The current directory (${__dirname}) is not a valid git repo. Would you like to provide a...`,
+message:`The current directory (${process.cwd()}) is not a valid git repo. Would you like to provide a...`,
59
choices:[localGit,remoteGit],
60
default:localGit,
61
});
@@ -114,7 +114,7 @@ async function promptForMissingOptions(options) {
114
isLocal=answers.source===localGit;
115
}
116
else{
117
-repo=options.dir||options.git||__dirname;
+repo=options.dir||options.git||process.cwd();
118
isLocal=options.git ?false :true;
119
120