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:
Javi Martín
2019-11-13 18:46:37 +01:00
parent 70cc7dee73
commit 0c33c4061d

View File

@@ -138,6 +138,7 @@ end
task :smtp_ssl_and_delay_jobs_secrets do
on roles(:app) do
if test("[ -d #{current_path} ]")
within current_path do
with rails_env: fetch(:rails_env) do
tasks_file_path = "lib/tasks/secrets.rake"
@@ -160,4 +161,5 @@ task :smtp_ssl_and_delay_jobs_secrets do
end
end
end
end
end