1
0
Fork 0
mirror of synced 2024-11-22 23:35:35 -05:00

Fix update with git tool when module dir is under

an unresolved symlink.
This commit is contained in:
Eric Nielsen 2021-08-26 18:12:39 -05:00
parent 3bbddf2a23
commit df70a1ca99
No known key found for this signature in database
GPG key ID: 47D1DBFA0765A1FB
3 changed files with 10 additions and 7 deletions

View file

@ -7,14 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
_No unreleased changes._ ### Fixed
- Error in `zimfw update` with the `git` tool when module directory is under an
unresolved symlink.
## [1.5.0] - 2021-08-10 ## [1.5.0] - 2021-08-10
### Added ### Added
- Option to use the new `degit` tool in `zmodule`, that is able to install and update modules - Option to use the new `degit` tool in `zmodule`, that is able to install and
from GitHub without requiring `git`. Modules are installed faster and take less disk space when update modules from GitHub without requiring `git`. Modules are installed
using this tool. It can be set as the default with `zstyle ':zim:zmodule' use 'degit'`. faster and take less disk space when using this tool. It can be set as the
default with `zstyle ':zim:zmodule' use 'degit'`.
### Fixed ### Fixed
- Force `core.autocrlf=false` when doing `git clone`. - Force `core.autocrlf=false` when doing `git clone`.

View file

@ -25,7 +25,7 @@ case ${ACTION} in
print_error "Error during cd ${DIR}" print_error "Error during cd ${DIR}"
return 1 return 1
fi fi
if [[ ${PWD} != $(command git rev-parse --show-toplevel 2>/dev/null) ]]; then if [[ ${PWD:A} != ${$(command git rev-parse --show-toplevel 2>/dev/null):A} ]]; then
print_error "Module was not installed using git. Will not try to update. You can disable this with the zmodule option -z|--frozen." print_error "Module was not installed using git. Will not try to update. You can disable this with the zmodule option -z|--frozen."
return 1 return 1
fi fi

View file

@ -595,7 +595,7 @@ case \${ACTION} in
print_error \"Error during cd \${DIR}\" print_error \"Error during cd \${DIR}\"
return 1 return 1
fi fi
if [[ \${PWD} != \$(command git rev-parse --show-toplevel 2>/dev/null) ]]; then if [[ \${PWD:A} != \${\$(command git rev-parse --show-toplevel 2>/dev/null):A} ]]; then
print_error \"Module was not installed using git. Will not try to update. You can disable this with the zmodule option -z|--frozen.\" print_error \"Module was not installed using git. Will not try to update. You can disable this with the zmodule option -z|--frozen.\"
return 1 return 1
fi fi
@ -660,7 +660,7 @@ esac
} }
zimfw() { zimfw() {
local -r _zversion='1.5.0' zusage="Usage: %B${0}%b <action> [%B-q%b|%B-v%b] local -r _zversion='1.5.1-SNAPSHOT' zusage="Usage: %B${0}%b <action> [%B-q%b|%B-v%b]
Actions: Actions:
%Bbuild%b Build %Binit.zsh%b and %Blogin_init.zsh%b %Bbuild%b Build %Binit.zsh%b and %Blogin_init.zsh%b