There was an error while loading. Please reload this page.
1 parent 512a3fb commit 383877cCopy full SHA for 383877c
src/create-probot-app.ts
@@ -76,6 +76,11 @@ Try running ${bold("npm " + command)} yourself.
76
const previousDir: string = process.cwd();
77
process.chdir(destination);
78
79
+ const chdirAndResolve = (): void => {
80
+ process.chdir(previousDir);
81
+ resolve();
82
+ };
83
+
84
npm.load(function (err) {
85
if (err) reject(err);
86
@@ -89,9 +94,9 @@ Try running ${bold("npm " + command)} yourself.
89
94
console.log(yellow("\n\nCompile application...\n"));
90
95
npm.commands["run-script"](["build"], function (err) {
91
96
if (err) reject(new NpmError("build application", "run build"));
92
- else resolve();
97
+ else chdirAndResolve();
93
98
});
- } else resolve();
99
+ } else chdirAndResolve();
100
101
102
0 commit comments