From 184076e5a50777f9fca91cff41a0cacdda57ac91 Mon Sep 17 00:00:00 2001 From: Eric Nielsen <4120606+ericbn@users.noreply.github.com> Date: Wed, 15 Jan 2025 21:31:11 -0500 Subject: [PATCH] Fix attempt to read non-existing .zdegit file when installing a module with the degit tool. Error was: _zimfw_download_tarball:11: no such file or directory: /path/to/.zdegit The .zdegit file is created as part of the module installation. --- src/stage2/75_zimfw_tool_degit.zsh.erb | 8 +++++--- zimfw.zsh | 10 ++++++---- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/stage2/75_zimfw_tool_degit.zsh.erb b/src/stage2/75_zimfw_tool_degit.zsh.erb index a08d70c..c3529b0 100644 --- a/src/stage2/75_zimfw_tool_degit.zsh.erb +++ b/src/stage2/75_zimfw_tool_degit.zsh.erb @@ -9,9 +9,11 @@ _zimfw_download_tarball() { fi readonly HEADERS_TARGET=${DIR}/${TEMP}_headers { - readonly INFO=("${(@f)"$(<${INFO_TARGET})"}") - # Previous REV is in line 2, reserved for future use. - readonly INFO_HEADER=${INFO[3]} + if [[ ${ACTION} != install ]]; then + readonly INFO=("${(@f)"$(<${INFO_TARGET})"}") + # Previous REV is in line 2, reserved for future use. + readonly INFO_HEADER=${INFO[3]} + fi readonly TARBALL_URL=https://api.github.com/repos/${REPO}/tarball/${REV} if [[ ${ACTION} == check ]]; then if [[ -z ${INFO_HEADER} ]] return 0 diff --git a/zimfw.zsh b/zimfw.zsh index 4b12a6d..621f303 100644 --- a/zimfw.zsh +++ b/zimfw.zsh @@ -485,7 +485,7 @@ _zimfw_info() { _zimfw_info_print_symlink ZIM_HOME ${ZIM_HOME} _zimfw_info_print_symlink 'zimfw config' ${_zconfig} _zimfw_info_print_symlink 'zimfw script' ${__ZIMFW_FILE} - print -R 'zimfw version: '${_zversion}' (built at 2025-01-16 02:07:28 UTC, previous commit is 4850633)' + print -R 'zimfw version: '${_zversion}' (built at 2025-01-16 02:29:49 UTC, previous commit is 913e815)' local zparam for zparam in LANG ${(Mk)parameters:#LC_*} OSTYPE TERM TERM_PROGRAM TERM_PROGRAM_VERSION ZSH_VERSION; do print -R ${(r.22....:.)zparam}${(P)zparam} @@ -635,9 +635,11 @@ _zimfw_download_tarball() { fi readonly HEADERS_TARGET=${DIR}/${TEMP}_headers { - readonly INFO=("${(@f)"$(<${INFO_TARGET})"}") - # Previous REV is in line 2, reserved for future use. - readonly INFO_HEADER=${INFO[3]} + if [[ ${ACTION} != install ]]; then + readonly INFO=("${(@f)"$(<${INFO_TARGET})"}") + # Previous REV is in line 2, reserved for future use. + readonly INFO_HEADER=${INFO[3]} + fi readonly TARBALL_URL=https://api.github.com/repos/${REPO}/tarball/${REV} if [[ ${ACTION} == check ]]; then if [[ -z ${INFO_HEADER} ]] return 0