From bbaf9b0c1bedede3fbd2928f08ac332db7c79417 Mon Sep 17 00:00:00 2001 From: Dean Kevorkian Date: Thu, 11 Feb 2021 02:37:08 +0200 Subject: [PATCH] Wrap the apm command in quotes in case it has spaces. --- src/helpers/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/index.ts b/src/helpers/index.ts index daba2e2..c10e743 100644 --- a/src/helpers/index.ts +++ b/src/helpers/index.ts @@ -128,7 +128,7 @@ const INSTALL_VALIDATION_REGEXP = /(?:Installing|Moving) (.*?) to .* (.*)/ export async function installPackage(dependency: DependencyResolved): Promise { const apmPath = IS_ATOM ? atom.packages.getApmPath() : 'apm' - const { stdout, stderr } = await spawn(apmPath, ['install', dependency.name, '--production', '--color', 'false'], { + const { stdout, stderr } = await spawn(`"${apmPath}"`, ['install', dependency.name, '--production', '--color', 'false'], { shell: true, })