Open eschnett opened 1 month ago
- The shell is called
-bash
, with a leading hyphen,
how come ? which environment leads to that? (I suck at shell scripting, so I'm unlikely to be able to fix that)
When a shell acts as login shell, then its $0
is modified to start with a dash.
See e.g. https://www.man7.org/linux/man-pages//man1/bash.1.html, section "SHELL BUILTIN COMMANDS", entry for "exec": "If the -l option is supplied, the shell places a dash at the beginning of the zeroth argument passed to command."
What is the bug?
The
setdevenv.sh
script contains code to check whether it is called or sourced by the shell:This test fails for me for two reasons:
-bash
, with a leading hyphen, andrealpath
aborts because it does not know about a-b
option--
before the argument the test still fails, probably because of the leading hyphenSteps to reproduce the issue
I source the script via
Versions and provenance
Current master branch as of today
Additional context
No response