From 699bcc0d27c7ac538e3a74fe4ad6b5eb958f17a1 Mon Sep 17 00:00:00 2001 From: Igor Alexandrov Date: Wed, 27 Mar 2024 20:56:47 +0400 Subject: [PATCH] Combined two methods and into one --- lib/kamal/cli/base.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/kamal/cli/base.rb b/lib/kamal/cli/base.rb index 8cf303e5..39b546f1 100644 --- a/lib/kamal/cli/base.rb +++ b/lib/kamal/cli/base.rb @@ -84,9 +84,7 @@ module Kamal::Cli run_hook "pre-connect" - ensure_run_directory - - ensure_locks_directory + ensure_run_and_locks_directory acquire_lock @@ -188,13 +186,11 @@ module Kamal::Cli instance_variable_get("@_invocations").first end - def ensure_run_directory + def ensure_run_and_locks_directory on(KAMAL.hosts) do execute(*KAMAL.server.ensure_run_directory) end - end - def ensure_locks_directory on(KAMAL.primary_host) do execute(*KAMAL.lock.ensure_locks_directory) end