mirror of https://github.com/zulip/zulip.git
zulip-puppet-apply: Make --force --noop have an exit code.
This commit is contained in:
parent
c91725bfb5
commit
ecfc23bd0b
|
@ -101,6 +101,12 @@ if not args.noop and not args.force:
|
||||||
if do_apply == "" or do_apply == "n":
|
if do_apply == "" or do_apply == "n":
|
||||||
sys.exit(0)
|
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 = subprocess.call([*puppet_cmd, "--detailed-exitcodes"], env=puppet_env)
|
||||||
# ret = 0 => no changes, no errors
|
# ret = 0 => no changes, no errors
|
||||||
# ret = 2 => changes, no errors
|
# ret = 2 => changes, no errors
|
||||||
|
|
Loading…
Reference in New Issue