Fix a bug which ignoring the files with link type.

This commit is contained in:
Wenxuan 2019-01-18 15:35:39 +08:00
parent 947954ea84
commit babb299206

View file

@ -143,7 +143,7 @@ forgit::ignore::update() {
forgit::ignore::get() {
local item filename header
for item in "$@"; do
if filename=$(find "$FORGIT_GI_REPO/templates" -type f -iname "${item}.gitignore" -print -quit); then
if filename=$(find -L "$FORGIT_GI_REPO/templates" -type f -iname "${item}.gitignore" -print -quit); then
[[ -z "$filename" ]] && forgit::warn "No gitignore template found for '$item'." && continue
header="${filename##*/}" && header="${header%.gitignore}"
echo "### $header" && cat "$filename" && echo