feat(otp): honour OTP_HOME and XDG_DATA_HOME (#12953)

This commit is contained in:
mattmc3
2026-09-21 13:27:12 -07:00
committed by GitHub
parent fa82d8a3eb
commit b6830a53d5
2 changed files with 10 additions and 2 deletions
+7 -1
View File
@@ -1,4 +1,10 @@
export OTP_HOME=~/.otp
if [[ -z "$OTP_HOME" ]]; then
if [[ ! -d "$HOME/.otp" ]] && [[ -n "$XDG_DATA_HOME" ]]; then
export OTP_HOME="$XDG_DATA_HOME/otp"
else
export OTP_HOME=~/.otp
fi
fi
mkdir -p $OTP_HOME
function ot () {