Also dump env into ~/.profile, fixes #763

This commit is contained in:
Julian Ospald 2024-02-02 15:40:17 +08:00
parent 02744ff4a0
commit 942685f396
No known key found for this signature in database
GPG Key ID: 4275CDA6A29BED43

View File

@ -561,6 +561,10 @@ adjust_bashrc() {
printf "\n%s" "[ -f \"${GHCUP_DIR}/env\" ] && source \"${GHCUP_DIR}/env\" # ghcup-env" >> "${GHCUP_PROFILE_FILE}" printf "\n%s" "[ -f \"${GHCUP_DIR}/env\" ] && source \"${GHCUP_DIR}/env\" # ghcup-env" >> "${GHCUP_PROFILE_FILE}"
;; ;;
esac esac
if [ -e "$HOME/.profile" ] ; then
sed -i -e '/# ghcup-env$/d' "$(posix_realpath "$HOME/.profile")"
printf "\n%s" "[ -f \"${GHCUP_DIR}/env\" ] && source \"${GHCUP_DIR}/env\" # ghcup-env" >> "$HOME/.profile"
fi
echo echo
echo "===============================================================================" echo "==============================================================================="
echo echo