Skip to content

Commit aa57790

Browse files
authored
Merge pull request #222 from andreasgrapentin/feat/quote-escape
properly quoting exec string to avoid breaking virtme-run invocation …
2 parents ad68078 + 08e9d54 commit aa57790

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

virtme_ng/run.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
)
2424
from select import select
2525
from pathlib import Path
26+
import shlex
2627

2728
import argcomplete
2829

@@ -876,7 +877,7 @@ def _get_virtme_exec(self, args):
876877
if args.envs:
877878
args.exec = " ".join(args.envs)
878879
if args.exec is not None:
879-
self.virtme_param["exec"] = f'--script-sh "{args.exec}"'
880+
self.virtme_param["exec"] = f'--script-sh {shlex.quote(args.exec)}'
880881
else:
881882
self.virtme_param["exec"] = ""
882883

0 commit comments

Comments
 (0)