We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9684833 commit b93e2c5Copy full SHA for b93e2c5
autogen/code_utils.py
@@ -219,7 +219,7 @@ def get_powershell_command():
219
if result.returncode == 0:
220
return "powershell"
221
222
- except FileNotFoundError:
+ except (FileNotFoundError, NotADirectoryError):
223
# This means that 'powershell' command is not found so now we try looking for 'pwsh'
224
try:
225
result = subprocess.run(
@@ -228,7 +228,7 @@ def get_powershell_command():
228
229
return "pwsh"
230
231
232
if WIN32:
233
logging.warning("Neither powershell nor pwsh is installed but it is a Windows OS")
234
return None
0 commit comments