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.
This commit is contained in:
parent
913e815113
commit
184076e5a5
2 changed files with 11 additions and 7 deletions
|
@ -9,9 +9,11 @@ _zimfw_download_tarball() {
|
||||||
fi
|
fi
|
||||||
readonly HEADERS_TARGET=${DIR}/${TEMP}_headers
|
readonly HEADERS_TARGET=${DIR}/${TEMP}_headers
|
||||||
{
|
{
|
||||||
readonly INFO=("${(@f)"$(<${INFO_TARGET})"}")
|
if [[ ${ACTION} != install ]]; then
|
||||||
# Previous REV is in line 2, reserved for future use.
|
readonly INFO=("${(@f)"$(<${INFO_TARGET})"}")
|
||||||
readonly INFO_HEADER=${INFO[3]}
|
# 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}
|
readonly TARBALL_URL=https://api.github.com/repos/${REPO}/tarball/${REV}
|
||||||
if [[ ${ACTION} == check ]]; then
|
if [[ ${ACTION} == check ]]; then
|
||||||
if [[ -z ${INFO_HEADER} ]] return 0
|
if [[ -z ${INFO_HEADER} ]] return 0
|
||||||
|
|
10
zimfw.zsh
10
zimfw.zsh
|
@ -485,7 +485,7 @@ _zimfw_info() {
|
||||||
_zimfw_info_print_symlink ZIM_HOME ${ZIM_HOME}
|
_zimfw_info_print_symlink ZIM_HOME ${ZIM_HOME}
|
||||||
_zimfw_info_print_symlink 'zimfw config' ${_zconfig}
|
_zimfw_info_print_symlink 'zimfw config' ${_zconfig}
|
||||||
_zimfw_info_print_symlink 'zimfw script' ${__ZIMFW_FILE}
|
_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
|
local zparam
|
||||||
for zparam in LANG ${(Mk)parameters:#LC_*} OSTYPE TERM TERM_PROGRAM TERM_PROGRAM_VERSION ZSH_VERSION; do
|
for zparam in LANG ${(Mk)parameters:#LC_*} OSTYPE TERM TERM_PROGRAM TERM_PROGRAM_VERSION ZSH_VERSION; do
|
||||||
print -R ${(r.22....:.)zparam}${(P)zparam}
|
print -R ${(r.22....:.)zparam}${(P)zparam}
|
||||||
|
@ -635,9 +635,11 @@ _zimfw_download_tarball() {
|
||||||
fi
|
fi
|
||||||
readonly HEADERS_TARGET=${DIR}/${TEMP}_headers
|
readonly HEADERS_TARGET=${DIR}/${TEMP}_headers
|
||||||
{
|
{
|
||||||
readonly INFO=("${(@f)"$(<${INFO_TARGET})"}")
|
if [[ ${ACTION} != install ]]; then
|
||||||
# Previous REV is in line 2, reserved for future use.
|
readonly INFO=("${(@f)"$(<${INFO_TARGET})"}")
|
||||||
readonly INFO_HEADER=${INFO[3]}
|
# 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}
|
readonly TARBALL_URL=https://api.github.com/repos/${REPO}/tarball/${REV}
|
||||||
if [[ ${ACTION} == check ]]; then
|
if [[ ${ACTION} == check ]]; then
|
||||||
if [[ -z ${INFO_HEADER} ]] return 0
|
if [[ -z ${INFO_HEADER} ]] return 0
|
||||||
|
|
Loading…
Reference in a new issue