Skip to content

Commit

Permalink
Use subprocess to handle spaces in executable path
Browse files Browse the repository at this point in the history
  • Loading branch information
isidroas committed Jan 14, 2025
1 parent 20d0a62 commit f9931b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mutmut/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import resource
import shutil
import signal
import subprocess
import sys
from abc import ABC
from collections import defaultdict
Expand Down Expand Up @@ -1656,8 +1657,7 @@ def load_thread():
def retest(self, pattern):
with self.suspend():
assert sys.argv[-1] == 'browse'
command = ' '.join([sys.executable] + sys.argv[:-1])
os.system(f'{command} run "{pattern}"')
subprocess.run([sys.executable, *sys.argv[:-1], 'run', pattern])
input('press enter to return to browser')

self.read_data()
Expand Down

0 comments on commit f9931b2

Please sign in to comment.