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.

puppet: Catch when a comma is left out of puppet_classes.

Alex Vandiver88c19bf65ac5
diff --git a/scripts/zulip-puppet-apply b/scripts/zulip-puppet-apply
index ad1d0372c1f..44c83b8aa30 100755
--- a/scripts/zulip-puppet-apply
+++ b/scripts/zulip-puppet-apply
@@ -34,6 +34,11 @@ Exec { path => "/usr/sbin:/usr/bin:/sbin:/bin" }
"""
for pclass in re.split(r"\s*,\s*", config.get("machine", "puppet_classes")):
+ if " " in pclass:
+ print(
+ f"The `machine.puppet_classes` setting in {args.config} must be comma-separated, not space-separated!"
+ )
+ sys.exit(1)
puppet_config += f"include {pclass}\n"
# We use the Puppet configuration from the same Zulip checkout as this script