lib/bolt/bolt_option_parser.rb in bolt-2.22.0 vs lib/bolt/bolt_option_parser.rb in bolt-2.23.0
- old
+ new
@@ -418,23 +418,22 @@
PROJECT_INIT_HELP = <<~HELP
NAME
init
USAGE
- bolt project init [directory] [options]
+ bolt project init [name] [options]
DESCRIPTION
- Create a new Bolt project.
+ Create a new Bolt project in the current working directory.
- Specify a directory to create a Bolt project in. Defaults to the
- curent working directory.
+ Specify a name for the Bolt project. Defaults to the basename of the current working directory.
EXAMPLES
- Create a new Bolt project in the current working directory.
+ Create a new Bolt project using the directory as the project name.
bolt project init
- Create a new Bolt project at a specified path.
- bolt project init ~/path/to/project
+ Create a new Bolt project with a specified name.
+ bolt project init myproject
Create a new Bolt project with existing modules.
bolt project init --modules puppetlabs-apt,puppetlabs-ntp
HELP
PROJECT_MIGRATE_HELP = <<~HELP
@@ -692,13 +691,13 @@
define('-p', '--password PASSWORD',
'Password to authenticate with') do |password|
@options[:password] = password
end
define('--password-prompt', 'Prompt for user to input password') do |_password|
- STDERR.print "Please enter your password: "
- @options[:password] = STDIN.noecho(&:gets).chomp
- STDERR.puts
+ $stderr.print "Please enter your password: "
+ @options[:password] = $stdin.noecho(&:gets).chomp
+ $stderr.puts
end
define('--private-key KEY', 'Path to private ssh key to authenticate with') do |key|
@options[:'private-key'] = File.expand_path(key)
end
define('--[no-]host-key-check', 'Check host keys with SSH') do |host_key_check|
@@ -718,13 +717,13 @@
define('--sudo-password PASSWORD',
'Password for privilege escalation') do |password|
@options[:'sudo-password'] = password
end
define('--sudo-password-prompt', 'Prompt for user to input escalation password') do |_password|
- STDERR.print "Please enter your privilege escalation password: "
- @options[:'sudo-password'] = STDIN.noecho(&:gets).chomp
- STDERR.puts
+ $stderr.print "Please enter your privilege escalation password: "
+ @options[:'sudo-password'] = $stdin.noecho(&:gets).chomp
+ $stderr.puts
end
define('--sudo-executable EXEC', "Specify an executable for running as another user.",
"This option is experimental.") do |exec|
@options[:'sudo-executable'] = exec
end
@@ -903,10 +902,10 @@
def get_arg_input(value)
if value.start_with?('@')
file = value.sub(/^@/, '')
read_arg_file(file)
elsif value == '-'
- STDIN.read
+ $stdin.read
else
value
end
end