mirror of
https://github.com/zdharma-continuum/zinit.git
synced 2026-09-10 07:36:38 -04:00
fix: from'gh-r' skips compile by default (#590)
Skip compile when from'gh-r' ice is set unless compile is also set. Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
This commit is contained in:
parent
8170753a5d
commit
1f52eee1b1
|
|
@ -94,7 +94,7 @@ ____
|
|||
|
||||
____
|
||||
|
||||
Has 83 line(s). Calls functions:
|
||||
Has 87 line(s). Calls functions:
|
||||
|
||||
.zinit-compile-plugin
|
||||
|-- zinit-side.zsh/.zinit-compute-ice
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
HOME="$ZPFX" # Stops programs creating directories in user home
|
||||
export ZBIN="${ZPFX}/bin"
|
||||
export os_type="${OSTYPE//[0-9\.]*/}"
|
||||
zinit default-ice --quiet from'gh-r' nocompile lbin''
|
||||
zinit default-ice --quiet from'gh-r' lbin
|
||||
}
|
||||
|
||||
# @test 'atmos' { Universal Tool for DevOps and Cloud Automation (works with terraform, helm, helmfile, etc)
|
||||
|
|
@ -723,7 +723,7 @@
|
|||
run "$s" --version; assert $state equals 0
|
||||
}
|
||||
@test 'sd' { # Intuitive find & replace CLI a.k.a modern sed
|
||||
run zinit lbin'!sd* -> sd' for @chmln/sd; assert $state equals 0
|
||||
run zinit for @chmln/sd; assert $state equals 0
|
||||
local sd="$ZBIN/sd"; assert "$sd" is_executable
|
||||
run "$sd" --version; assert $state equals 0
|
||||
}
|
||||
|
|
|
|||
|
|
@ -830,6 +830,12 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
|
|||
.zinit-compute-ice "$id_as" "pack" \
|
||||
ICE plugin_dir filename is_snippet || return 1
|
||||
|
||||
# when from"gh-r" ice set, skip compile unless compile ice is set
|
||||
if [[ ${ICE[from]} = gh-r ]] && (( ${+ICE[compile]} == 0 )); then
|
||||
+zi-log '{d} from"gh-r" detected, skipping compile'
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [[ ${ICE[pick]} != /dev/null && ${ICE[as]} != null && \
|
||||
${+ICE[null]} -eq 0 && ${ICE[as]} != command && ${+ICE[binary]} -eq 0 && \
|
||||
( ${+ICE[nocompile]} = 0 || ${ICE[nocompile]} = \! )
|
||||
|
|
|
|||
Loading…
Reference in a new issue