From 2cae17f8f32b0193384d2c7734afee1c60c4add2 Mon Sep 17 00:00:00 2001 From: luisrayas3 Date: Fri, 23 Mar 2018 16:46:30 -0700 Subject: [PATCH] When using a non-standard shell fix the usage of DEFAULT_SHELL. (#511) Previously, using a non-standard shell meant using that non-standard shell's path (shell_path) whereas the shell_name would be bash. Not only is there this discrepancy, but then the command is actually run with the non-standard shell, which is liable to cause runtime errors (as it does if e.g. SHELL=/usr/bin/fish). --- catkin_tools/resultspace.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/catkin_tools/resultspace.py b/catkin_tools/resultspace.py index 290896c5..0f0ad9c3 100644 --- a/catkin_tools/resultspace.py +++ b/catkin_tools/resultspace.py @@ -110,7 +110,8 @@ def get_resultspace_environment(result_space_path, base_env=None, quiet=False, c # Use fallback shell if using a non-standard shell if shell_name not in ['bash', 'zsh']: - shell_name = 'bash' + shell_path = DEFAULT_SHELL + (_, shell_name) = os.path.split(shell_path) # Check to make sure result_space_path contains the appropriate setup file setup_file_path = os.path.join(result_space_path, 'env.sh')