Skip to content

Commit f511ac0

Browse files
author
uid10804
committed
fix(cli): update-stack: get current working directory correctly
1 parent 35e9af1 commit f511ac0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/cli/src/actions/helpers.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ export class Helpers {
3636

3737
static changeDirectory(directoryPath: string): void {
3838
try {
39-
if (!fs.existsSync(path.resolve(__dirname, directoryPath))) {
39+
if (!fs.existsSync(path.resolve(process.cwd(), directoryPath))) {
4040
throw new Error(
41-
'Cannot find path' +
42-
path.resolve(__dirname, directoryPath) +
41+
'Cannot find path ' +
42+
path.resolve(process.cwd(), directoryPath) +
4343
'- please verify that this path exists.'
4444
);
4545
} else {
46-
process.chdir(path.resolve(__dirname, directoryPath));
46+
process.chdir(path.resolve(process.cwd(), directoryPath));
4747
}
4848
} catch (err) {
4949
throw new Error(err);

0 commit comments

Comments
 (0)