Combined two methods and into one
This commit is contained in:
@@ -84,9 +84,7 @@ module Kamal::Cli
|
|||||||
|
|
||||||
run_hook "pre-connect"
|
run_hook "pre-connect"
|
||||||
|
|
||||||
ensure_run_directory
|
ensure_run_and_locks_directory
|
||||||
|
|
||||||
ensure_locks_directory
|
|
||||||
|
|
||||||
acquire_lock
|
acquire_lock
|
||||||
|
|
||||||
@@ -188,13 +186,11 @@ module Kamal::Cli
|
|||||||
instance_variable_get("@_invocations").first
|
instance_variable_get("@_invocations").first
|
||||||
end
|
end
|
||||||
|
|
||||||
def ensure_run_directory
|
def ensure_run_and_locks_directory
|
||||||
on(KAMAL.hosts) do
|
on(KAMAL.hosts) do
|
||||||
execute(*KAMAL.server.ensure_run_directory)
|
execute(*KAMAL.server.ensure_run_directory)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
def ensure_locks_directory
|
|
||||||
on(KAMAL.primary_host) do
|
on(KAMAL.primary_host) do
|
||||||
execute(*KAMAL.lock.ensure_locks_directory)
|
execute(*KAMAL.lock.ensure_locks_directory)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user