diff --git a/.chezmoiscripts/run_onchange_before_linux-install-packages.sh.tmpl b/.chezmoiscripts/run_onchange_before_linux-install-packages.sh.tmpl index 2894aba..9e9cfc4 100644 --- a/.chezmoiscripts/run_onchange_before_linux-install-packages.sh.tmpl +++ b/.chezmoiscripts/run_onchange_before_linux-install-packages.sh.tmpl @@ -38,7 +38,7 @@ fi {{ end }} {{/* 手動安裝 lazygit */ -}} -{{ if and (eq .chezmoi.osRelease.id "debian") (le .chezmoi.osRelease.versionID 12) }} +{{ if and (eq .chezmoi.osRelease.id "debian") (hasKey .chezmoi.osRelease "versionID") (le .chezmoi.osRelease.versionID 12) }} LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | \grep -Po '"tag_name": *"v\K[^"]*') curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/download/v${LAZYGIT_VERSION}/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz" tar xf lazygit.tar.gz lazygit