Warn on missing builder

We are going to try to create a builder if one is missing, so let's warn
rather than report it as an error.
This commit is contained in:
Donal McBreen
2024-05-02 12:38:20 +01:00
parent 375f0283c4
commit b67f40bdf7
2 changed files with 2 additions and 2 deletions

View File

@@ -30,7 +30,7 @@ class Kamal::Cli::Build < Kamal::Cli::Base
end end
rescue SSHKit::Command::Failed => e rescue SSHKit::Command::Failed => e
if e.message =~ /(no builder)|(no such file or directory)/ if e.message =~ /(no builder)|(no such file or directory)/
error "Missing compatible builder, so creating a new one first" warn "Missing compatible builder, so creating a new one first"
if cli.create if cli.create
KAMAL.with_verbosity(:debug) { execute *KAMAL.builder.push } KAMAL.with_verbosity(:debug) { execute *KAMAL.builder.push }

View File

@@ -34,7 +34,7 @@ class CliBuildTest < CliTestCase
.returns(true) .returns(true)
run_command("push").tap do |output| run_command("push").tap do |output|
assert_match /Missing compatible builder, so creating a new one first/, output assert_match /WARN Missing compatible builder, so creating a new one first/, output
end end
end end