summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/puppet/util/command_line.rb16
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/puppet/util/command_line.rb b/lib/puppet/util/command_line.rb
index 8190f8ac1..c475dacc4 100644
--- a/lib/puppet/util/command_line.rb
+++ b/lib/puppet/util/command_line.rb
@@ -93,13 +93,19 @@ module Puppet
if zero == 'puppet'
case argv.first
- when nil; [ stdin.tty? ? nil : "apply", argv] # ttys get usage info
- when "--help", "-h"; [nil, argv] # help should give you usage, not the help for `puppet apply`
- when /^-|\.pp$|\.rb$/; ["apply", argv]
- else [ argv.first, argv[1..-1] ]
+ when nil then
+ # ttys get usage info
+ [stdin.tty? ? nil : "apply", argv]
+ when "--help", "-h" then
+ # help should give you usage, not the help for `puppet apply`
+ [nil, argv]
+ when /^-|\.pp$|\.rb$/ then
+ ["apply", argv]
+ else
+ [argv.first, argv[1..-1]]
end
else
- [ zero, argv ]
+ [zero, argv]
end
end