From 0cfa1d2b7ae38020d3b845d7713cb10cda7facef Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Wed, 13 Feb 2008 16:27:35 -0600 Subject: Fixed #968 again, this time with tests -- parseonly works, including not compiling the configurations, and also storeconfigs is no longer required during parse-testing. --- bin/puppet | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'bin') 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 -- cgit