mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 08:53:07 +09:00
Issue #1887 - Allow /bin/sh to be used as a fallback value when SHELL is not set.
This commit is contained in:
parent
4caef059e4
commit
292d71cd24
1 changed files with 4 additions and 2 deletions
|
|
@ -17,14 +17,16 @@ from .logging import LoggingMixin
|
|||
|
||||
|
||||
# Perform detection of operating system environment. This is used by command
|
||||
# execution. We only do this once to save redundancy. Yes, this can fail module
|
||||
# loading. That is arguably OK.
|
||||
# execution. We only do this once to save redundancy. Fall back to checking
|
||||
# existence of /bin/sh if environment detection fails.
|
||||
if 'SHELL' in os.environ:
|
||||
_current_shell = os.environ['SHELL']
|
||||
elif 'MOZILLABUILD' in os.environ:
|
||||
_current_shell = os.environ['MOZILLABUILD'] + '/msys/bin/sh.exe'
|
||||
elif 'COMSPEC' in os.environ:
|
||||
_current_shell = os.environ['COMSPEC']
|
||||
elif os.path.exists("/bin/sh"):
|
||||
_current_shell = '/bin/sh'
|
||||
else:
|
||||
raise Exception('Could not detect environment shell!')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue