From 42a9ece4d515024a196c623b646a707b392a2299 Mon Sep 17 00:00:00 2001 From: Lightning Date: Mon, 19 Feb 2024 15:10:54 +0100 Subject: [PATCH] fix installation paths --- manifests/install.pp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/manifests/install.pp b/manifests/install.pp index 223fa59..bcf4396 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -7,8 +7,14 @@ $source_url = "${onetimesecret::download_url}/${filename}" # Construct target paths and filenames. - $archive_target = "${onetimesecret::install_dir}/${filename}" - $install_target = "${onetimesecret::install_dir}/onetimesecret-${version}" + $archive_target = $version ? { + /^v(\d+\..*)$/ => "${onetimesecret::install_dir}/onetimesecret-${1}.tar.gz", + default => "${onetimesecret::install_dir}/onetimesecret-${filename}", + } + $install_target = $version ? { + /^v(\d+\..*)$/ => "${onetimesecret::install_dir}/onetimesecret-${1}", + default => "${onetimesecret::install_dir}/onetimesecret-${version}", + } # We won't be able to build the app without these packages. if ( $onetimesecret::manage_additional_packages == true ) {