From 707a8daaead5f33cbfd46a2e5c5ca25b2842aaee Mon Sep 17 00:00:00 2001 From: psakiev Date: Tue, 12 Nov 2024 16:20:39 -0700 Subject: [PATCH] Compatibility --- lib/spack/spack/util/shell_detection.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/util/shell_detection.py b/lib/spack/spack/util/shell_detection.py index 7af72f87028..a6d6062e6a5 100644 --- a/lib/spack/spack/util/shell_detection.py +++ b/lib/spack/spack/util/shell_detection.py @@ -17,7 +17,10 @@ def active_shell_type(env=os.environ): else: try: output = subprocess.run( - 'powershell -Command "echo $PSVersionTable"', shell=True, check=True, text=True + 'powershell -Command "echo $PSVersionTable"', + shell=True, + check=True, + universal_newlines=True, ) if "PSVersion" in output: return "ps1"