Skip to content

Commit

Permalink
Refactor install.sh to set ownership of phpvm to current user
Browse files Browse the repository at this point in the history
  • Loading branch information
Thavarshan committed Oct 6, 2024
1 parent 19cbaf5 commit a4f7308
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bin/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@ EOL
exit 1
}

# Additional step to set ownership to the current user to avoid permission issues
sudo chown "$(whoami)" "$BIN_DIR/phpvm" || {
phpvm_echo >&2 "Failed to change ownership of 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 a4f7308

Please sign in to comment.