summaryrefslogtreecommitdiffstats
path: root/bin/puppet
diff options
context:
space:
mode:
Diffstat (limited to 'bin/puppet')
-rwxr-xr-xbin/puppet12
1 files changed, 10 insertions, 2 deletions
diff --git a/bin/puppet b/bin/puppet
index f5d230a7a..952ffcbf8 100755
--- a/bin/puppet
+++ b/bin/puppet
@@ -171,6 +171,16 @@ else
Puppet[:manifest] = ARGV.shift
end
+if Puppet[:parseonly]
+ begin
+ Puppet::Parser::Interpreter.new.parser(Puppet[:environment])
+ rescue => detail
+ Puppet.err detail
+ exit 1
+ end
+ exit 0
+end
+
# Collect our facts.
facts = Puppet::Node::Facts.find("me")
facts.name = facts.values["hostname"]
@@ -198,8 +208,6 @@ begin
# Compile our catalog
catalog = Puppet::Node::Catalog.find(node)
- exit(0) if Puppet[:parseonly]
-
# Translate it to a RAL catalog
catalog = catalog.to_ral