aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2018-07-03 13:37:58 +0100
committerChristopher Baines <mail@cbaines.net>2018-07-03 13:37:58 +0100
commit1750a12888fce3eee221233cd11cdb2ec8ae76c3 (patch)
tree4b4dd8b04841cfdf390f0421848fde4f02218e14
parente79624b97279def43e4e7f187c5ed2f5d07fafaa (diff)
downloadgovuk-mini-environment-admin-1750a12888fce3eee221233cd11cdb2ec8ae76c3.tar
govuk-mini-environment-admin-1750a12888fce3eee221233cd11cdb2ec8ae76c3.tar.gz
Handle the Guix signing-key not existingrelease_9
Other parts of the code handle not having Guix locally, so add support here also.
-rw-r--r--app/models/backends/terraform_aws.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/backends/terraform_aws.rb b/app/models/backends/terraform_aws.rb
index 2bf68a3..65ca68c 100644
--- a/app/models/backends/terraform_aws.rb
+++ b/app/models/backends/terraform_aws.rb
@@ -78,5 +78,9 @@ class Backends::TerraformAws < ApplicationRecord
def guix_public_key
"(entry #{File.read("/etc/guix/signing-key.pub")} (tag (guix import)))"
+ rescue Errno::ENOENT
+ # This is optional, as if it doesn't exist, it means that `guix
+ # copy` won't be used
+ ''
end
end