diff options
Diffstat (limited to 'lib/puppet/util')
-rw-r--r-- | lib/puppet/util/command_line.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/puppet/util/command_line.rb b/lib/puppet/util/command_line.rb index 59454364c..ba474df91 100644 --- a/lib/puppet/util/command_line.rb +++ b/lib/puppet/util/command_line.rb @@ -2,12 +2,10 @@ module Puppet module Util module CommandLine def self.shift_subcommand_from_argv( argv = ARGV, stdin = STDIN ) - if ! argv.first - "main" unless stdin.tty? # ttys get usage info - elsif argv.first =~ /^-|\.pp$|\.rb$/ - "main" - else - argv.shift + case argv.first + when nil; "apply" unless stdin.tty? # ttys get usage info + when /^-|\.pp$|\.rb$/; "apply" + else argv.shift end end end |