sixty-north / venv-management

A Python package for programmatic creation of Python virtual environments
MIT License
0 stars 1 forks source link

Consider following symlinks to find the shell executable #2

Open rob-smallshire opened 3 years ago

rob-smallshire commented 3 years ago

The code in _sub_shell_command depends on knowing which type of shell is in use. In the presence of symbolic links like /bin/sh it can be tricky to find the ultimate shell executable. Consider using the shell function from this answer to locate the actual shell executable: https://stackoverflow.com/questions/23011370/how-to-recognize-whether-bash-or-dash-is-being-used-within-a-script