aboutsummaryrefslogtreecommitdiff
path: root/app/jobs/govuk_guix/fetch_revision_job.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/jobs/govuk_guix/fetch_revision_job.rb')
-rw-r--r--app/jobs/govuk_guix/fetch_revision_job.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/jobs/govuk_guix/fetch_revision_job.rb b/app/jobs/govuk_guix/fetch_revision_job.rb
index 7b1acdf..0265c6e 100644
--- a/app/jobs/govuk_guix/fetch_revision_job.rb
+++ b/app/jobs/govuk_guix/fetch_revision_job.rb
@@ -53,6 +53,10 @@ class GovukGuix::FetchRevisionJob < Que::Job
store_path = output.last.strip
logger.debug(self.class) { "store_path: #{store_path}" }
+ unless Guix.valid_store_path? store_path
+ raise "Invalid store path: #{store_path}"
+ end
+
backend.add_in_use_store_path(store_path) if backend
GovukGuix::Revision.transaction do