fix: trim the python output

This commit is contained in:
Amin Yahyaabadi 2021-09-16 17:39:30 -05:00
parent 3c2eaf1f4d
commit df6ee47b06
1 changed files with 8 additions and 2 deletions

View File

@ -36,9 +36,15 @@ export async function setupPipPack(name: string, version?: string) {
binDir = "/usr/local/bin/" binDir = "/usr/local/bin/"
} else { } else {
try { 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 { } 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`) info(`${binDir} to PATH`)