diff options
author | Christopher Baines <mail@cbaines.net> | 2019-05-30 08:30:46 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2019-05-30 08:33:03 +0100 |
commit | cbae44c758e367441a045a5c9b6e82e1b095d8a1 (patch) | |
tree | 6f42548cf0479716e1abcc6b0d54197fb2c72974 /app/jobs/govuk_guix/fetch_revision_job.rb | |
parent | b4d832455870f251350b305397cfd7efc037e66f (diff) | |
download | govuk-mini-environment-admin-cbae44c758e367441a045a5c9b6e82e1b095d8a1.tar govuk-mini-environment-admin-cbae44c758e367441a045a5c9b6e82e1b095d8a1.tar.gz |
Add some checking for valid store paths
Diffstat (limited to 'app/jobs/govuk_guix/fetch_revision_job.rb')
-rw-r--r-- | app/jobs/govuk_guix/fetch_revision_job.rb | 4 |
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 |