sbt-idp/unset_env.sh

12 lines
242 B
Bash
Raw Permalink Normal View History

2024-02-21 05:46:41 +00:00
#!/bin/bash
# Load .env file into current shell session
set -a
source .env
set +a
# Unset each variable defined in .env
while IFS= read -r line || [[ -n "$line" ]]; do
variable=$(echo "$line" | cut -d= -f1)
unset "$variable"
done < .env