From 33f7ddc263ab8df33d9b6d8a2b921b9505644d34 Mon Sep 17 00:00:00 2001 From: Luka Vandervelden Date: Tue, 3 Sep 2019 13:15:07 +0200 Subject: [PATCH] -n, --ignore-dependencies option added. --- src/main.cr | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main.cr b/src/main.cr index e3f08cd..de6b872 100644 --- a/src/main.cr +++ b/src/main.cr @@ -18,6 +18,7 @@ requested_recipes = [] of String download_only = false do_not_clean = false watch_only = false +skip_build_dependencies = false used_X = false OptionParser.parse! do |parser| @@ -68,6 +69,10 @@ OptionParser.parse! do |parser| context.verbosity -= 1 } + parser.on("-n", "--ignore-dependencies", "Do not try to install build-dependencies.") { + skip_build_dependencies = true + } + parser.invalid_option do |flag| STDERR.puts "ERROR: #{flag} is not a valid option." STDERR.puts parser @@ -132,7 +137,7 @@ begin end end - if dependencies.size > 0 + if dependencies.size > 0 && ! skip_build_dependencies # FIXME: We’ll probably want to have backends other than apk at some point. opts = ["add"] + (ENV["APK_FLAGS"]? || "-i").split(/[ \t]+/) + dependencies puts "+ apk #{opts.join " "}"