mirror of
https://github.com/zulip/zulip.git
synced 2025-10-27 18:13:58 +00:00
zulip-puppet-apply: Make --force --noop have an exit code.
(cherry picked from commit ecfc23bd0b)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user