Dump xcrun output when we don't parse it.
[cdist.git] / cdist
diff --git a/cdist b/cdist
index 516dcadaf34fe742fbc1291c4c76ce43b27884bb..7a5748bf9d9d83c7a2cbd5816ecccbb84bc6b12a 100755 (executable)
--- a/cdist
+++ b/cdist
@@ -257,11 +257,11 @@ def rmtree(a):
 def command(c):
     log_normal(c)
     try:
-        r = subprocess.run(shlex.split(c), 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)
@@ -755,6 +755,9 @@ def notarize(dmg, bundle_id):
         elif status == 'success':
             subprocess.run(['xcrun', 'stapler', 'staple', dmg])
             return
+        else:
+            print("Could not understand xcrun response")
+            print(p)
         time.sleep(30)
 
     raise Error("Notarization timed out")