From 355cefe3823b0f68cbc7d799dcaccb851f3c9a6b Mon Sep 17 00:00:00 2001 From: Samuel Elliott Date: Sat, 7 May 2022 23:02:43 +0100 Subject: [PATCH] Fix running from a path with spaces --- src/util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.ts b/src/util.ts index 99be856..df9280f 100644 --- a/src/util.ts +++ b/src/util.ts @@ -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 = (() => {