Skip to content

Commit 383877c

Browse files
authored
fix: show correct folder on app creation (#318)
1 parent 512a3fb commit 383877c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/create-probot-app.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ Try running ${bold("npm " + command)} yourself.
7676
const previousDir: string = process.cwd();
7777
process.chdir(destination);
7878

79+
const chdirAndResolve = (): void => {
80+
process.chdir(previousDir);
81+
resolve();
82+
};
83+
7984
npm.load(function (err) {
8085
if (err) reject(err);
8186

@@ -89,9 +94,9 @@ Try running ${bold("npm " + command)} yourself.
8994
console.log(yellow("\n\nCompile application...\n"));
9095
npm.commands["run-script"](["build"], function (err) {
9196
if (err) reject(new NpmError("build application", "run build"));
92-
else resolve();
97+
else chdirAndResolve();
9398
});
94-
} else resolve();
99+
} else chdirAndResolve();
95100
});
96101
});
97102
});

0 commit comments

Comments
 (0)