Skip to content

Commit 7bce2cc

Browse files
authored
Fix missing common resource file (#635)
1 parent 9040284 commit 7bce2cc

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

bin/antigen.zsh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1895,7 +1895,11 @@ EOC
18951895
# `antigen` wrapper not `antigen-apply` directly and it's called by an extension.
18961896
LOG "TRACE: ${funcfiletrace}"
18971897
if [[ $ANTIGEN_AUTO_CONFIG == true && $#ANTIGEN_CHECK_FILES -eq 0 ]]; then
1898-
ANTIGEN_CHECK_FILES+=(~/.zshrc)
1898+
# Check common configuration file does exist.
1899+
if [[ -f $HOME/.zshrc ]]; then
1900+
ANTIGEN_CHECK_FILES+=($HOME/.zshrc)
1901+
fi
1902+
# TODO Fix: Fuzzy match shoud be replaced by a sane way to determine it.
18991903
if [[ $#funcfiletrace -ge 6 ]]; then
19001904
ANTIGEN_CHECK_FILES+=("${${funcfiletrace[6]%:*}##* }")
19011905
fi

src/ext/cache.zsh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,11 @@ EOC
126126
# `antigen` wrapper not `antigen-apply` directly and it's called by an extension.
127127
LOG "TRACE: ${funcfiletrace}"
128128
if [[ $ANTIGEN_AUTO_CONFIG == true && $#ANTIGEN_CHECK_FILES -eq 0 ]]; then
129-
ANTIGEN_CHECK_FILES+=(~/.zshrc)
129+
# Check common configuration file does exist.
130+
if [[ -f $HOME/.zshrc ]]; then
131+
ANTIGEN_CHECK_FILES+=($HOME/.zshrc)
132+
fi
133+
# TODO Fix: Fuzzy match shoud be replaced by a sane way to determine it.
130134
if [[ $#funcfiletrace -ge 6 ]]; then
131135
ANTIGEN_CHECK_FILES+=("${${funcfiletrace[6]%:*}##* }")
132136
fi

0 commit comments

Comments
 (0)