diff --git a/src/plugins.ts b/src/plugins.ts index 3c7572ff..0ff10f20 100644 --- a/src/plugins.ts +++ b/src/plugins.ts @@ -396,7 +396,8 @@ export default class Plugins { this.debug(`Using node executable located at: ${nodeExecutable}`) this.debug(`Using npm executable located at: ${npmCli}`) - const command = `${nodeExecutable} ${npmCli} show ${name} dist-tags` + // wrap node and path in double quotes to deal with spaces + const command = `"${nodeExecutable}" "${npmCli}" show ${name} dist-tags` let npmShowResult try { diff --git a/src/util.ts b/src/util.ts index 3fe51263..a5057d6c 100644 --- a/src/util.ts +++ b/src/util.ts @@ -74,8 +74,7 @@ export async function findNode(root: string): Promise { // Check to see if node is installed const nodeShellString = shelljs.which('node') if (nodeShellString?.code === 0 && nodeShellString?.stdout) { - // wrap node path in double quotes to deal with spaces - return `"${nodeShellString.stdout}"` + return `${nodeShellString.stdout}` } const err = new Error('Cannot locate node executable.')