fix: Vscode permission fix

This commit is contained in:
Andras Bacsai 2022-04-21 11:25:51 +02:00
parent 1d4e5df5a2
commit 68f2f4f978

View File

@ -100,12 +100,13 @@ export const post: RequestHandler = async (event) => {
await asyncExecShell(`DOCKER_HOST=${host} docker compose -f ${composeFileDestination} up -d`);
const changePermissionOn = persistentStorage.map((p) => p.path);
await asyncExecShell(
`DOCKER_HOST=${host} docker exec -u root ${id} chown -R 1000:1000 ${changePermissionOn.join(
' '
)}`
);
if (changePermissionOn.length > 0) {
await asyncExecShell(
`DOCKER_HOST=${host} docker exec -u root ${id} chown -R 1000:1000 ${changePermissionOn.join(
' '
)}`
);
}
return {
status: 200
};