Fix running from a path with spaces

This commit is contained in:
Samuel Elliott 2022-05-07 23:02:43 +01:00
parent 370b5f1b56
commit 355cefe382
No known key found for this signature in database
GPG Key ID: 8420C7CDE43DC4D6

View File

@ -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 = (() => {