Skip to content

Commit 1c15c12

Browse files
Use shell=False for Popen on Windows
1 parent a038c8e commit 1c15c12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pytensor/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def subprocess_Popen(command: str | list[str], **params):
143143
# Unless "shell=True", "g++.bat" is not executed when trying to
144144
# execute "g++" without extensions.
145145
# (Executing "g++.bat" explicitly would also work.)
146-
params["shell"] = True
146+
params["shell"] = False
147147
# "If shell is True, it is recommended to pass args as a string rather than as a sequence." (cite taken from https://docs.python.org/2/library/subprocess.html#frequently-used-arguments)
148148
# In case when command arguments have spaces, passing a command as a list will result in incorrect arguments break down, and consequently
149149
# in "The filename, directory name, or volume label syntax is incorrect" error message.

0 commit comments

Comments
 (0)