Added -y option to kamal traefik reboot command

This commit is contained in:
Igor Alexandrov
2024-03-20 21:11:06 +04:00
parent 474b76cf47
commit bbf952952d
5 changed files with 29 additions and 16 deletions

View File

@@ -103,6 +103,16 @@ module Kamal::Cli
release_lock
end
def confirming(question)
return yield if options[:confirmed]
if ask(question, limited_to: %w[ y N ], default: "N") == "y"
yield
else
say "Aborted", :red
end
end
def acquire_lock
raise_if_locked do
say "Acquiring the deploy lock...", :magenta