From df6ee47b062744ff7039c235eb00074dc9b7581e Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Thu, 16 Sep 2021 17:39:30 -0500 Subject: [PATCH] fix: trim the python output --- src/utils/setup/setupPipPack.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/utils/setup/setupPipPack.ts b/src/utils/setup/setupPipPack.ts index 398a9423..8dcbf6bd 100644 --- a/src/utils/setup/setupPipPack.ts +++ b/src/utils/setup/setupPipPack.ts @@ -36,9 +36,15 @@ export async function setupPipPack(name: string, version?: string) { binDir = "/usr/local/bin/" } else { try { - binDir = join((await getExecOutput('python3 -c "import sys;print(sys.base_exec_prefix);"')).stdout, "Scripts") + binDir = join( + (await getExecOutput('python3 -c "import sys;print(sys.base_exec_prefix);"')).stdout.trim(), + "Scripts" + ) } catch { - binDir = join((await getExecOutput('python -c "import sys;print(sys.base_exec_prefix);"')).stdout, "Scripts") + binDir = join( + (await getExecOutput('python -c "import sys;print(sys.base_exec_prefix);"')).stdout.trim(), + "Scripts" + ) } } info(`${binDir} to PATH`)