Skip to content

Commit

Permalink
When using a non-standard shell fix the usage of DEFAULT_SHELL. (#511)
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
luisrayas3 authored and wjwwood committed Mar 23, 2018
1 parent cd12a13 commit 2cae17f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion catkin_tools/resultspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 2cae17f

Please # to comment.