Skip to content

Commit a4f7308

Browse files
committed
Refactor install.sh to set ownership of phpvm to current user
1 parent 19cbaf5 commit a4f7308

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bin/install.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,12 @@ EOL
114114
exit 1
115115
}
116116

117+
# Additional step to set ownership to the current user to avoid permission issues
118+
sudo chown "$(whoami)" "$BIN_DIR/phpvm" || {
119+
phpvm_echo >&2 "Failed to change ownership of phpvm in $BIN_DIR. Please ensure you have the necessary permissions."
120+
exit 1
121+
}
122+
117123
phpvm_echo "=> phpvm has been installed to $BIN_DIR and is now globally available."
118124
}
119125

0 commit comments

Comments
 (0)