From fd048a936d789e3a771043dcad2562af1a8c1558 Mon Sep 17 00:00:00 2001 From: undefined Date: Thu, 2 Oct 2025 17:02:55 +0800 Subject: [PATCH] install: try to fix install session --- install/install.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/install/install.sh b/install/install.sh index 778129f49..3bf43aa18 100644 --- a/install/install.sh +++ b/install/install.sh @@ -12,6 +12,14 @@ echo "Executing Hydro install script v3.0.1" echo "Hydro includes system telemetry, which helps developers figure out the most commonly used operating system and platform. To disable this feature, checkout our sourcecode." +# Sessions started with `su` will not have updated $USER, need to manually fix everything +actual_user=$(whoami) +if [ "$actual_user" != "$USER" ]; then +export USER=root +export LOGNAME=root +export HOME=/root +export PWD=/root +fi mkdir -p /data/db /data/file ~/.hydro bash <(curl https://hydro.ac/nix.sh) export PATH=$HOME/.nix-profile/bin:$PATH