X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=cdist;h=0aa4fd2d9587fae1832c81571f4aff1b4796f6e2;hb=0da3845cd2dcb59fd4e407b85274aba389d7c2d6;hp=10bed90f89262b3656d0d6ca844b6516090fad45;hpb=1929c5d0df545dddb8e78779b09e9f6c5b25e9f5;p=cdist.git diff --git a/cdist b/cdist index 10bed90..0aa4fd2 100755 --- a/cdist +++ b/cdist @@ -256,13 +256,12 @@ def rmtree(a): def command(c): log_normal(c) - posix = sys.platform != 'win32' try: - r = subprocess.run(shlex.split(c, posix=posix), shell=True) + r = subprocess.run(c, shell=True) if r.returncode != 0: - raise Error(f'command {c} failed ({r.returncode})') + raise Error('command %s failed (%d)' % (c, r.returncode)) except Exception as e: - raise Error(f'command {c} failed ({e})') + raise Error('command %s failed (%s)' % (c, e)) def command_and_read(c): log_normal(c)