Skip to content

Commit 1c810e7

Browse files
☈kingrking@sharpsaw.org
☈king
authored andcommitted
Warn more when the "source <(cat $d/*)" has trouble.
1 parent e682c27 commit 1c810e7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/scripting

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,14 @@ alias sourceif=...sourceif # Backwards compatibility.
7979
else
8080
cat $d/*
8181
fi
82+
find $d -name '.*.sw?' -exec echo '{}' is probably going to be trouble. \;
8283
source <(cat $d/*)
84+
if [ $? != 0 ]; then
85+
...warn "Oops. Had a problem. Trying `pwd`/$d/* individually to debug:"
86+
for n in $d/*; do
87+
...warn $n
88+
...source $n
89+
done
90+
fi
8391
}
8492
# vim:ft=zsh

0 commit comments

Comments
 (0)