Skip to content

Commit

Permalink
fix ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Jul 12, 2024
1 parent 57c0ef0 commit 667f1e7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/internal/winmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import errno
import fnmatch
import os
import shlex
import shutil
import site
import ssl
Expand Down Expand Up @@ -117,9 +118,9 @@ def win_colorprint(s, color=LIGHTBLUE):
def sh(cmd, nolog=False):
if not nolog:
safe_print("cmd: " + cmd)
p = subprocess.Popen(
cmd, shell=True, env=os.environ, cwd=os.getcwd() # noqa
)
if isinstance(cmd, str):
cmd = shlex.split(cmd)
p = subprocess.Popen(cmd, env=os.environ, cwd=os.getcwd())
p.communicate()
if p.returncode != 0:
sys.exit(p.returncode)
Expand Down

0 comments on commit 667f1e7

Please sign in to comment.