umccr / icav2-cli-plugins

A set of additional subcommands for icav2
MIT License
2 stars 0 forks source link

Use SHELL_EXE=$(readlink -f /proc/$$/exe) over $SHELL in source script #281

Open alexiswl opened 1 month ago

alexiswl commented 1 month ago

If running icav2 cli plugins inside a bash script, one needs to resource ~/.icav2-cli-plugins/source.sh as functions aren't inherited by subshells.

If the main shell is zsh, then $SHELL will remain as /usr/bin/zsh, not /usr/bin/bash inside the shell script.

Instead use the /proc/$$/exe symlink to determine the executable