summaryrefslogtreecommitdiffstats
path: root/bin/puppet
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-02-13 16:27:35 -0600
committerLuke Kanies <luke@madstop.com>2008-02-13 16:27:35 -0600
commit0cfa1d2b7ae38020d3b845d7713cb10cda7facef (patch)
treefcfa2861cb0174ab610235a14c69909d094de4a8 /bin/puppet
parent8367fdfab25aacb56f16444f5763b347e6a907ab (diff)
downloadpuppet-0cfa1d2b7ae38020d3b845d7713cb10cda7facef.tar.gz
puppet-0cfa1d2b7ae38020d3b845d7713cb10cda7facef.tar.xz
puppet-0cfa1d2b7ae38020d3b845d7713cb10cda7facef.zip
Fixed #968 again, this time with tests -- parseonly works,
including not compiling the configurations, and also storeconfigs is no longer required during parse-testing.
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