Details
Description
Using env var $SHELL is fragile when used to determine the current shell. For example, a user with '/bin/sh' login shell sources loadLSST.sh within a bash subprocess and the env var $SHELL remains /bin/sh
A more robust method:
thisshell=$(ps -cp "$$" -o command="") |
lsst_distrib code here. Stackoverflow here.
This was seen in a batch environment where spawning subprocesses is typical, as opposed to a user laptop environment. Our workaround was to override $SHELL.
Kian-Tat Lim I just found this ticket that was filed before Christmas. Not sure if you want to look at it or Matthias Wittgen.