From 3e3e975df56e6048594b1eaaed5ddbeab80918fb Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sun, 24 Jun 2018 10:04:15 +0100 Subject: Guard against invalid build outputs Which seem to be a possibility if the job is forcefully stopped. --- app/services/govuk_guix/build_mini_environment.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/services/govuk_guix/build_mini_environment.rb b/app/services/govuk_guix/build_mini_environment.rb index 9bce8b5..a0361b0 100644 --- a/app/services/govuk_guix/build_mini_environment.rb +++ b/app/services/govuk_guix/build_mini_environment.rb @@ -60,6 +60,9 @@ module GovukGuix::BuildMiniEnvironment ) build_output = output.last.strip + + raise 'InvalidOutput' unless build_output.starts_with? '/gnu/store' + logger.debug(self.class) { "build_output: #{build_output}" } mini_environment.update( -- cgit v1.2.3