Docker: Make install-plugin.sh set proper user permissions

Otherwise we get new files owned by root:root instead of the
user who actually uses the script.
This commit is contained in:
Rémi Verschelde
2020-01-21 12:26:22 +01:00
parent 77bbc26133
commit 3041084307

View File

@@ -1,3 +1,8 @@
#!/bin/bash
docker exec -it godotengine-org--php /usr/local/bin/php artisan plugin:install "$1"
USERID=${SUDO_UID}
if [ -z "${USERID}" ]; then
USERID=${UID}
fi
sudo docker exec -it godotengine-org--php bash -c "/usr/local/bin/php artisan plugin:install \"$1\" && chown ${USERID}:${USERID} -R plugins/"