print context, simple pp! for now, better display later
parent
4decf96f10
commit
492ce2f9cc
11
src/main.cr
11
src/main.cr
|
@ -19,6 +19,8 @@ do_not_clean = false
|
|||
watch_only = false
|
||||
skip_build_dependencies = false
|
||||
print_deps = false
|
||||
only_print_configuration = false
|
||||
|
||||
|
||||
used_X = false
|
||||
OptionParser.parse do |parser|
|
||||
|
@ -77,6 +79,10 @@ OptionParser.parse do |parser|
|
|||
skip_build_dependencies = true
|
||||
}
|
||||
|
||||
parser.on("-p", "--print-configuration", "Only print configuration.") {
|
||||
only_print_configuration = true
|
||||
}
|
||||
|
||||
parser.invalid_option do |flag|
|
||||
STDERR.puts "ERROR: #{flag} is not a valid option."
|
||||
STDERR.puts parser
|
||||
|
@ -95,6 +101,11 @@ elsif configuration_file_requested
|
|||
exit 1
|
||||
end
|
||||
|
||||
if only_print_configuration
|
||||
pp! context
|
||||
exit 0
|
||||
end
|
||||
|
||||
found_recipes = requested_recipes.map do |name|
|
||||
context.find_recipe(name) || name
|
||||
end
|
||||
|
|
Reference in New Issue