Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

zulip-puppet-apply: Make --force --noop have an exit code.

Alex Vandiverecfc23bd0bef
diff --git a/scripts/zulip-puppet-apply b/scripts/zulip-puppet-apply
index 4a5be9b4e33..104dd5657e2 100755
--- a/scripts/zulip-puppet-apply
+++ b/scripts/zulip-puppet-apply
@@ -101,6 +101,12 @@ if not args.noop and not args.force:
if do_apply == "" or do_apply == "n":
sys.exit(0)
+if args.noop and args.force:
+ if noop_would_change(puppet_cmd):
+ sys.exit(1)
+ else:
+ sys.exit(0)
+
ret = subprocess.call([*puppet_cmd, "--detailed-exitcodes"], env=puppet_env)
# ret = 0 => no changes, no errors
# ret = 2 => changes, no errors