7 ms·
You could do that, and it'd still be POSIX-shell comptible: loadenv() { case "$-" in *a*) source ./.env ;; *) set -a; sourc
by iokanuon 2y ago
You could do that, and it'd still be POSIX-shell comptible:
loadenv() {
case "$-" in
*a*) source ./.env ;;
*) set -a; source ./.env; set +a ;;
esac
}
Although I have yet to see a long shellscript utilise `set -a` globally :)