This is an automated email from the ASF dual-hosted git repository.

benweidig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tapestry-5.git


The following commit(s) were added to refs/heads/master by this push:
     new 91d4f899a TAP5-2809: NpmTask use /tmp/.npm as cache
91d4f899a is described below

commit 91d4f899a582a4db46772265ac45fc71038829c3
Author: Ben Weidig <[email protected]>
AuthorDate: Sat Apr 18 11:50:33 2026 +0200

    TAP5-2809: NpmTask use /tmp/.npm as cache
---
 buildSrc/src/main/groovy/t5build/NpmTask.groovy | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/buildSrc/src/main/groovy/t5build/NpmTask.groovy 
b/buildSrc/src/main/groovy/t5build/NpmTask.groovy
index 8786d9745..4312e6284 100644
--- a/buildSrc/src/main/groovy/t5build/NpmTask.groovy
+++ b/buildSrc/src/main/groovy/t5build/NpmTask.groovy
@@ -73,7 +73,10 @@ class NpmTask extends Exec {
         def cmd = [
             'docker', 'run', '--rm',
             '-v', "${project.projectDir}/src/main:/work",
-            '-w', '/work/typescript']
+            '-w', '/work/typescript',
+            // The node:lts-alpine image has a root-owned /.npm cache baked in.
+            // Redirect to /tmp so the container user can always write to it.
+            '-e', 'NPM_CONFIG_CACHE=/tmp/.npm']
         if (isLinux()) {
             cmd += ['--user', "${['id', '-u'].execute().text.trim()}:${['id', 
'-g'].execute().text.trim()}"]
         }

Reply via email to