Match a "does not exist" error message
Only show the warning for building when we are actually going to do that and match `does not exist` in the error message. Fixes: https://github.com/basecamp/kamal/issues/851
This commit is contained in:
@@ -43,8 +43,8 @@ class Kamal::Cli::Build < Kamal::Cli::Base
|
|||||||
cli.create
|
cli.create
|
||||||
end
|
end
|
||||||
rescue SSHKit::Command::Failed => e
|
rescue SSHKit::Command::Failed => e
|
||||||
warn "Missing compatible builder, so creating a new one first"
|
if e.message =~ /(context not found|no builder|does not exist)/
|
||||||
if e.message =~ /(context not found|no builder)/
|
warn "Missing compatible builder, so creating a new one first"
|
||||||
cli.create
|
cli.create
|
||||||
else
|
else
|
||||||
raise
|
raise
|
||||||
|
|||||||
Reference in New Issue
Block a user