12 lines
222 B
Fish
12 lines
222 B
Fish
function dotenv
|
|
|
|
# check if a .env exists
|
|
if test ! -e .env
|
|
echo ".env not found." > /dev/stderr
|
|
return 1
|
|
end
|
|
|
|
while read -d "=" name value
|
|
set -x -g $name $value
|
|
end < .env
|
|
end |