Skip to content

Commit 9c0cacc

Browse files
authored
hestiacp#906 Fix Composer install when folder is missing (hestiacp#907)
1 parent 2896c6b commit 9c0cacc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bin/v-add-user-composer

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ if [ -f "$COMPOSER_BIN" ]; then
4646
exit
4747
fi
4848

49-
[ -z "$(readlink -f "$COMPOSER_DIR" | egrep "^$HOMEDIR/$user/")" ] && check_result $E_FORBIDEN "Path outside of user homedir (Composer dir)"
50-
[ -z "$(readlink -f "$COMPOSER_BIN" | egrep "^$HOMEDIR/$user/")" ] && check_result $E_FORBIDEN "Path outside of user homedir (Composer bin)"
51-
[ -z "$(readlink -f "$HOMEDIR/$user/.config/" | egrep "^$HOMEDIR/$user/")" ] && check_result $E_FORBIDEN "Path outside of user homedir (.conf)"
49+
[ -z "$(readlink -m "$COMPOSER_DIR" | egrep "^$HOMEDIR/$user/")" ] && check_result $E_FORBIDEN "Path outside of user homedir (Composer dir)"
50+
[ -z "$(readlink -m "$COMPOSER_BIN" | egrep "^$HOMEDIR/$user/")" ] && check_result $E_FORBIDEN "Path outside of user homedir (Composer bin)"
51+
[ -z "$(readlink -m "$HOMEDIR/$user/.config/" | egrep "^$HOMEDIR/$user/")" ] && check_result $E_FORBIDEN "Path outside of user homedir (.conf)"
5252

5353
mkdir -p "$COMPOSER_DIR"
5454
chown $user: "$COMPOSER_DIR"

0 commit comments

Comments
 (0)