From ed3445f213f6aa6b30e19389114ad9e815ae144c Mon Sep 17 00:00:00 2001 From: James Lott Date: Sat, 7 Dec 2024 16:02:45 +0000 Subject: [PATCH] Studio.js: fix hab cache permissions on hosts without habitat install --- lib/Studio.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Studio.js b/lib/Studio.js index 34a5950..66cd35f 100644 --- a/lib/Studio.js +++ b/lib/Studio.js @@ -198,6 +198,7 @@ class Studio { await containerExec({ id: containerId }, 'adduser', '-u', `${uid}`, '-G', 'developer', '-D', username); await containerExec({ id: containerId }, 'mkdir', '-p', `/home/${username}/.hab`); await containerExec({ id: containerId }, 'ln', '-sf', '/hab/cache', `/home/${username}/.hab/`); + if (!artifactCachePath) await containerExec({ id: containerId }, 'chown', '-R', `${uid}:${gid}`, '/hab/cache'); defaultUser = `${uid}`; }