You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BF: set $USER to output of whoami if env var USER is not defined (#270)
* BF: set $USER to output of whoami if env var USER is not defined
Current use case is a singularity image, which is ran with -e to avoid side
effects from env vars on the host box. But USER variable is often used/relied
upon different tools. Immediate use case - FSL 6.0.1
$ DISPLAY=:0 fsl
Error in startup script: can't read "env(USER)": no such variable
while executing
"set USER $env(USER)"
(file "/opt/fsl-6.0.1/tcl/fslstart.tcl" line 6)
invoked from within
"source [ file dirname [ info script ] ]/fslstart.tcl"
(file "/opt/fsl-6.0.1/tcl/fsl.tcl" line 71)
invoked from within
"source ${FSLDIR}/tcl/${origname}.tcl"
(file "/opt/fsl-6.0.1/bin/fsl" line 22)
but I thought it would generally be useful and should not have
side-effects, that is why added to the generic startup script.
The only concern I just got is reprozip minimized images -- would they
have whoami? But even then, the situation should not be grave since
`whoami` seems to be not executed if USER is defined, so should generally
work ;)
* BF: USER variable must be exported
0 commit comments