Skip to content

Commit

Permalink
Revert "Set default shell on Windows to "powershell" (AcademySoftware…
Browse files Browse the repository at this point in the history
…Foundation#1578)"

This reverts commit c700e99.
  • Loading branch information
PiloeGAO committed Sep 4, 2024
1 parent 6f5bcdb commit fa8acee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
3 changes: 0 additions & 3 deletions src/rez/rezconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,9 +565,6 @@
# The default shell type to use when creating resolved environments (eg when using
# :ref:`rez-env`, or calling :meth:`.ResolvedContext.execute_shell`). If empty or None, the
# current shell is used (for eg, "bash").
#
# .. versionchanged:: 3.0.0
# The default value on Windows was changed to "powershell".
default_shell = ""

# The command to use to launch a new Rez environment in a separate terminal (this
Expand Down
5 changes: 2 additions & 3 deletions src/rez/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,15 @@ def shell(self):
"""Get the current shell.
Returns:
The current shell this process is running in (bash, tcsh, pwsh, etc). On Windows,
the return value is always "powershell".
The current shell this process is running in (bash, tcsh, pwsh, etc).
"""
from rez.shells import get_shell_types
shells = set(get_shell_types())
if not shells:
raise RezSystemError("no shells available")

if self.platform == "windows":
return "powershell"
return "cmd"
else:
import subprocess as sp
shell = None
Expand Down

0 comments on commit fa8acee

Please sign in to comment.