We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 35e9af1 commit f511ac0Copy full SHA for f511ac0
packages/cli/src/actions/helpers.ts
@@ -36,14 +36,14 @@ export class Helpers {
36
37
static changeDirectory(directoryPath: string): void {
38
try {
39
- if (!fs.existsSync(path.resolve(__dirname, directoryPath))) {
+ if (!fs.existsSync(path.resolve(process.cwd(), directoryPath))) {
40
throw new Error(
41
- 'Cannot find path' +
42
- path.resolve(__dirname, directoryPath) +
+ 'Cannot find path ' +
+ path.resolve(process.cwd(), directoryPath) +
43
'- please verify that this path exists.'
44
);
45
} else {
46
- process.chdir(path.resolve(__dirname, directoryPath));
+ process.chdir(path.resolve(process.cwd(), directoryPath));
47
}
48
} catch (err) {
49
throw new Error(err);
0 commit comments