Skip to content

Commit

Permalink
Refactor install.sh to improve installation process and set execute p…
Browse files Browse the repository at this point in the history
…ermissions for phpvm
  • Loading branch information
Thavarshan committed Oct 6, 2024
1 parent 048e5f8 commit 19cbaf5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bin/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,17 @@ EOL
mkdir -p "$BIN_DIR"
fi

cp "$INSTALL_DIR/phpvm" "$BIN_DIR/phpvm" || {
sudo cp "$INSTALL_DIR/phpvm" "$BIN_DIR/phpvm" || {
phpvm_echo >&2 "Failed to copy phpvm to $BIN_DIR. Please ensure you have the necessary permissions."
exit 1
}

# Ensure the script has the correct permissions
sudo chmod +x "$BIN_DIR/phpvm" || {
phpvm_echo >&2 "Failed to set execute permissions for phpvm in $BIN_DIR. Please ensure you have the necessary permissions."
exit 1
}

phpvm_echo "=> phpvm has been installed to $BIN_DIR and is now globally available."
}

Expand Down

0 comments on commit 19cbaf5

Please sign in to comment.