Skip to content

Commit dcbbd76

Browse files
committed
dietpi-globals: G_CHECK_ROOT_USER: detect login shell correctly
1 parent 15b16c7 commit dcbbd76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dietpi/func/dietpi-globals

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ $grey─────────────────────────
392392
(( $EUID )) || return 0
393393

394394
# Invoking shell is not a script
395-
if [[ $0 == 'bash' || $0 == *'/bash' ]]
395+
if [[ $0 == '-bash' || $0 == 'bash' || $0 == *'/bash' ]]
396396
then
397397
# Invoking function is a G_* function, try to run with G_SUDO
398398
if [[ ${FUNCNAME[1]} == 'G_'* ]]

0 commit comments

Comments
 (0)