diff options
| -rw-r--r-- | lib/puppet/application/puppet.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/puppet/application/puppet.rb b/lib/puppet/application/puppet.rb index dd752846c..a87ae488f 100644 --- a/lib/puppet/application/puppet.rb +++ b/lib/puppet/application/puppet.rb @@ -64,6 +64,12 @@ Puppet::Application.new(:puppet) do end command(:parseonly) do + # Set our code or file to use. + if options[:code] or ARGV.length == 0 + Puppet[:code] = options[:code] || STDIN.read + else + Puppet[:manifest] = ARGV.shift + end begin Puppet::Parser::Interpreter.new.parser(Puppet[:environment]) rescue => detail |
