This transforms the layout of the code, to make it easier to work with, but
makes no functional changes. Done separately to make clearer the functional
changes vs the non-functional changes.
---
lib/puppet/util/command_line.rb | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/lib/puppet/util/command_line.rb b/lib/puppet/util/command_line.rb
index 8190f8a..c475dac 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
--
1.7.5.2
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en.