mottosso / bleeding-rez

Rez - Reproducible software environments for Windows, Linux and MacOS
GNU Lesser General Public License v3.0
72 stars 10 forks source link

--isolated doesn't like system commands not being present #68

Closed mottosso closed 5 years ago

mottosso commented 5 years ago

An edgecase; on a Windows system where cmd or powershell is not available on PATH, or likewise for bash on a Linux system, --isolated throws the following error.

Traceback (most recent call last):
  File "c:\python\python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\python\python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Python\Python37\Scripts\rez.exe\__main__.py", line 9, in <module>
  File "c:\python\python37\lib\site-packages\rez\cli\_main.py", line 196, in run
    environ = isolated_environment()
  File "c:\python\python37\lib\site-packages\rez\cli\_main.py", line 147, in isolated_environment
    whichdir("cmd"),
  File "c:\python\python37\lib\site-packages\rez\cli\_main.py", line 143, in whichdir
    return os.path.dirname(which(exe))
  File "c:\python\python37\lib\ntpath.py", line 221, in dirname
    return split(p)[0]
  File "c:\python\python37\lib\ntpath.py", line 183, in split
    p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType