Skip to content

Commit

Permalink
python: execute pythonImportsCheckPhase in subshell
Browse files Browse the repository at this point in the history
Execute in subshell so that the cwd returns back
to the original directory. This is important as
it enables pythonImportsCheck to work with checkPhase
  • Loading branch information
jonringer committed Feb 20, 2020
1 parent 504f8bf commit cd97c05
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pythonImportsCheckPhase () {

if [ -n "$pythonImportsCheck" ]; then
echo "Check whether the following modules can be imported: $pythonImportsCheck"
cd $out && eval "@pythonCheckInterpreter@ -c 'import os; import importlib; list(map(lambda mod: importlib.import_module(mod), os.environ[\"pythonImportsCheck\"].split()))'"
( cd $out && eval "@pythonCheckInterpreter@ -c 'import os; import importlib; list(map(lambda mod: importlib.import_module(mod), os.environ[\"pythonImportsCheck\"].split()))'" )
fi
}

Expand Down

0 comments on commit cd97c05

Please sign in to comment.