Fix secrets task on first deployments
New CONSUL instances who didn't use the newest installer and haven't done any deployments with capistrano would get an exception because the `current` capistrano folder doesn't exist yet.
This commit is contained in:
@@ -138,6 +138,7 @@ end
|
|||||||
|
|
||||||
task :smtp_ssl_and_delay_jobs_secrets do
|
task :smtp_ssl_and_delay_jobs_secrets do
|
||||||
on roles(:app) do
|
on roles(:app) do
|
||||||
|
if test("[ -d #{current_path} ]")
|
||||||
within current_path do
|
within current_path do
|
||||||
with rails_env: fetch(:rails_env) do
|
with rails_env: fetch(:rails_env) do
|
||||||
tasks_file_path = "lib/tasks/secrets.rake"
|
tasks_file_path = "lib/tasks/secrets.rake"
|
||||||
@@ -160,4 +161,5 @@ task :smtp_ssl_and_delay_jobs_secrets do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user