Commit dc496318 authored by Charles Ferguson's avatar Charles Ferguson
Browse files

Ensure that the 'perl-env' and 'python-env' command exit with the RC.

When the perl-env and python-env tools are executed with a command
line passed to them, they would not terminate with the correct return
code. This meant that their use as part of a test environment (although
I'm not keen on that - they will go away eventually) would not be
possible.

Fortunately, it's just a matter of returning the correct code immediately
after the command runs. Or I could just have used 'set -e', but didn't
in the end.
parent 2f4509bc
...@@ -56,6 +56,8 @@ else ...@@ -56,6 +56,8 @@ else
# Commands were given; execute them in the environment # Commands were given; execute them in the environment
source "${_PERLLIB_ENVDIR}/bin/activate_perllib" source "${_PERLLIB_ENVDIR}/bin/activate_perllib"
"${_PERLLIB_COMMAND[@]}" "${_PERLLIB_COMMAND[@]}"
# And terminate with the return code
exit $?
elif "$_PERLLIB_SHELL" ; then elif "$_PERLLIB_SHELL" ; then
echo "Dropping to shell" echo "Dropping to shell"
# Commands were not given, but a shell was requested # Commands were not given, but a shell was requested
......
...@@ -56,6 +56,8 @@ else ...@@ -56,6 +56,8 @@ else
# Commands were given; execute them in the environment # Commands were given; execute them in the environment
source "${_PYTHONLIB_ENVDIR}/bin/activate" source "${_PYTHONLIB_ENVDIR}/bin/activate"
"${_PYTHONLIB_COMMAND[@]}" "${_PYTHONLIB_COMMAND[@]}"
# And terminate with the return code
exit $?
elif "$_PYTHONLIB_SHELL" ; then elif "$_PYTHONLIB_SHELL" ; then
echo "Dropping to shell" echo "Dropping to shell"
# Commands were not given, but a shell was requested # Commands were not given, but a shell was requested
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment