From 1750a12888fce3eee221233cd11cdb2ec8ae76c3 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Tue, 3 Jul 2018 13:37:58 +0100 Subject: Handle the Guix signing-key not existing Other parts of the code handle not having Guix locally, so add support here also. --- app/models/backends/terraform_aws.rb | 4 ++++ 1 file changed, 4 insertions(+) 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 -- cgit v1.2.3