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
|
||||
end
|
||||
rescue SSHKit::Command::Failed => e
|
||||
if e.message =~ /(context not found|no builder|does not exist)/
|
||||
warn "Missing compatible builder, so creating a new one first"
|
||||
if e.message =~ /(context not found|no builder)/
|
||||
cli.create
|
||||
else
|
||||
raise
|
||||
|
||||
Reference in New Issue
Block a user