projects
/
cdist.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d0d369e
)
Also we need to specify posix to shlex.split to avoid it removing backslashes.
author
Carl Hetherington
<cth@carlh.net>
Fri, 20 Nov 2020 12:04:38 +0000
(13:04 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Fri, 20 Nov 2020 12:04:38 +0000
(13:04 +0100)
cdist
patch
|
blob
|
history
diff --git
a/cdist
b/cdist
index 516dcadaf34fe742fbc1291c4c76ce43b27884bb..10bed90f89262b3656d0d6ca844b6516090fad45 100755
(executable)
--- a/
cdist
+++ b/
cdist
@@
-256,8
+256,9
@@
def rmtree(a):
def command(c):
log_normal(c)
+ posix = sys.platform != 'win32'
try:
- r = subprocess.run(shlex.split(c), shell=True)
+ r = subprocess.run(shlex.split(c
, posix=posix
), shell=True)
if r.returncode != 0:
raise Error(f'command {c} failed ({r.returncode})')
except Exception as e: