fix: is non-empty before match check

This commit is contained in:
Aditya Gupta
2026-06-19 21:45:04 +05:30
parent d376d6e3e2
commit c3d911957d

View File

@@ -15,7 +15,7 @@ if [ -n "${ZSH_VERSION:-}" ]; then
*file*) is_sourced=true ;;
esac
elif [ -n "${BASH_VERSION:-}" ]; then
if [ "${BASH_SOURCE[0]}" != "$0" ]; then
if [ -n "${BASH_SOURCE[0]:-}" ] && [ "${BASH_SOURCE[0]}" != "$0" ]; then
is_sourced=true
fi
fi