fix archive_type bug introduced earlier

This commit is contained in:
Lockszmith (wsl@Sygin) 2025-04-12 09:57:23 -04:00
parent d824f2ae98
commit c34f7ae631
1 changed files with 3 additions and 2 deletions

View File

@ -22,7 +22,8 @@
{{- if (env "CZ_EXTR") -}} {{- if (env "CZ_EXTR") -}}
{{/* Initialize template variables */}} {{/* Initialize template variables */}}
{{- $myArch := "" -}} {{- $myArch := "" -}}
{{- $archive_type := or (get (dict "linux" "tgz") .chezmoi.os) "zip" -}} {{- $archive_type := or (get (dict "linux" "tar.gz") .chezmoi.os) "zip" -}}
{{- $archive_type_short := or (get (dict "tar.gz" "tgz") $archive_type) $archive_type -}}
{{- $path_prefix := "" -}} {{- $path_prefix := "" -}}
{{- $externals := dict -}} {{- $externals := dict -}}
@ -94,7 +95,7 @@
{{- with $version := (gitHubLatestRelease $repo).GetTagName -}} {{- with $version := (gitHubLatestRelease $repo).GetTagName -}}
{{- $_ := set $externals (printf ".local/bin/%s" $app_name) (dict {{- $_ := set $externals (printf ".local/bin/%s" $app_name) (dict
"type" "archive-file" "type" "archive-file"
"url" (printf "https://github.com/%s/releases/download/%s/%s-%s.full.%s" $repo $version $app_name $myArch $archive_type) "url" (printf "https://github.com/%s/releases/download/%s/%s-%s.full.%s" $repo $version $app_name $myArch $archive_type_short)
"path" $app_name "path" $app_name
"executable" true "executable" true
"refreshPeriod" $defaultRefresh "refreshPeriod" $defaultRefresh