Skip to content

Commit 966f1a7

Browse files
authored
bugfix
fixing user detection bug when installing as superuser via `su`. The bug appeared after: 7591045
1 parent 857b5a5 commit 966f1a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ fi
9999
echo -e "${COLOR}[3/4]${ENDC} Launching the mytoninstaller.py"
100100
parent_name=$(ps -p $PPID -o comm=)
101101
user=$(whoami)
102-
if [ "$parent_name" = "sudo" ]; then
102+
if [ "$parent_name" = "sudo" ] || [ "$parent_name" = "su" ]; then
103103
user=$(logname)
104104
fi
105105
python3 ${SOURCES_DIR}/mytonctrl/mytoninstaller.py -m ${mode} -u ${user} -t ${telemetry} --dump ${dump}

0 commit comments

Comments
 (0)