Skip to content

Commit

Permalink
Fix running from a path with spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelthomas2774 committed May 7, 2022
1 parent 370b5f1 commit 355cefe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const debug = createDebug('cli');

export const paths = getPaths('nxapi');

export const dir = path.resolve(import.meta.url.substr(process.platform === 'win32' ? 8 : 7), '..', '..');
export const dir = path.resolve(decodeURI(import.meta.url.substr(process.platform === 'win32' ? 8 : 7)), '..', '..');
export const pkg = JSON.parse(fs.readFileSync(path.join(dir, 'package.json'), 'utf-8'));
export const version = pkg.version;
export const git = (() => {
Expand Down

0 comments on commit 355cefe

Please sign in to comment.