From 8d6c0b4380f4c8fb708c3bb9c86b9ef9e8f5c514 Mon Sep 17 00:00:00 2001 From: Martin Artnik <85488244+artoscinote@users.noreply.github.com> Date: Fri, 18 Oct 2024 14:38:35 +0200 Subject: [PATCH] Change download path for report templates --- bin/load_report_templates | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/load_report_templates b/bin/load_report_templates index 8bb1c4f05..e0190f306 100755 --- a/bin/load_report_templates +++ b/bin/load_report_templates @@ -12,8 +12,8 @@ contents = case template_zip_url.scheme when 'https' HTTParty.get(template_zip_url).body when 's3' - system("AWS_PAGER=\"\" aws s3api get-object --bucket #{template_zip_url.host} --key #{template_zip_url.path[1..]} ./report_templates.zip") - File.read('./report_templates.zip') + system("AWS_PAGER=\"\" aws s3api get-object --bucket #{template_zip_url.host} --key #{template_zip_url.path[1..]} #{ENV.fetch('APP_HOME', '.')}/app/views/reports/report_templates.zip") + File.read("#{ENV.fetch('APP_HOME', '.')}/app/views/reports/report_templates.zip") end puts "Loaded report templates zip from #{template_zip_url_string}"