Skip to content

Commit ddcd79d

Browse files
author
Kristan Kenney
committed
Merge branch 'fix/960-v-change-user-php-cli-error' into staging/fixes
2 parents d7c8d98 + 85c490d commit ddcd79d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

bin/v-change-user-php-cli

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ if [ ! -f "$HESTIA_INSTALL_DIR/multiphp/$WEB_SYSTEM/PHP-${version//.}.sh" ]; the
4444
exit
4545
fi
4646

47+
#create .bash_aliases is not exsists
48+
if [ ! -f "$FILE" ]; then
49+
touch "$FILE"
50+
fi
51+
4752
if grep -q "alias php='env php$version'" "$FILE"; then
4853
echo "PHP CLI Already defined"
4954
exit;
@@ -53,11 +58,6 @@ fi
5358
# Action #
5459
#----------------------------------------------------------#
5560

56-
#create .bash_aliases is not exsists
57-
if [ ! -f "$FILE" ]; then
58-
touch "$FILE"
59-
fi
60-
6161
sed -i "/alias php='env/d" "$FILE"
6262

6363
echo "alias php='env php$version'" >> $FILE

0 commit comments

Comments
 (0)