From 91bc338599639f5ddbe6a4f9e1d83e2b81c9be93 Mon Sep 17 00:00:00 2001 From: Konrad Hinsen Date: Sun, 17 Jan 2021 19:38:16 +0100 Subject: [PATCH] Run installation script with pipenv on PATH --- src/PythonBridge-Pharo/PBPharoPlatform.class.st | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/PythonBridge-Pharo/PBPharoPlatform.class.st b/src/PythonBridge-Pharo/PBPharoPlatform.class.st index d6f317e..b4cb262 100644 --- a/src/PythonBridge-Pharo/PBPharoPlatform.class.st +++ b/src/PythonBridge-Pharo/PBPharoPlatform.class.st @@ -99,11 +99,17 @@ PBPharoPlatform >> forceInstallEnvironmentForApp: application [ self assert: PBPharoPipenvProcess pipenvPath isEmptyOrNil not description: 'pipenv is apparently not accessible at a standard location. Please, have a look at the Troubleshooting section of https://objectprofile.github.io/PythonBridge/pages/pharo-installation'. proc := OSSUnixSubprocess new command: '/bin/bash'; - addAllEnvVariablesFromParentWithoutOverride; - arguments: (Array - with: ((self runtimeFolderForApplication: application) / 'install_env.sh') fullName); - terminateOnShutdown; - runAndWait. + addAllEnvVariablesFromParentWithoutOverride. + proc + environmentAt: 'PATH' + put: (PBPharoPipenvProcess pipenvPath + asFileReference parent fullName), + ':', (proc envVariables at: 'PATH'). + proc + arguments: (Array + with: ((self runtimeFolderForApplication: application) / 'install_env.sh') fullName); + terminateOnShutdown; + runAndWait. proc isSuccess ifFalse: [ self signalPipenvCreateEnvFailed ]. ]