From c80a52d1313a3677d417d81d4e64b5e09ec4ebff Mon Sep 17 00:00:00 2001 From: AlCalzone Date: Thu, 12 Dec 2024 19:39:42 +0100 Subject: [PATCH] fix: avoid cross-link issues in devcontainer and gitpod (#7483) --- .devcontainer/devcontainer.json | 8 +++++--- .gitpod.yml | 16 +++++++++++----- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 62b4ddf4d594..6f3c6247b68e 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,10 +1,12 @@ { "image": "mcr.microsoft.com/devcontainers/javascript-node:0-18", "containerEnv": { - "YARN_ENABLE_GLOBAL_CACHE": "false", // Avoids cross-link issues due to different filesystems between /home and /workspaces - "COREPACK_ENABLE_DOWNLOAD_PROMPT": "0" // Avoids interactive prompt causing container creation to hang + // Avoids cross-link issues due to different filesystems between /home and /workspaces + "YARN_GLOBAL_FOLDER": "/workspaces/node-zwave-js/.yarn/global", + "YARN_ENABLE_GLOBAL_CACHE": "false", + // Avoids interactive prompt causing container creation to hang + "COREPACK_ENABLE_DOWNLOAD_PROMPT": "0" }, - "updateContentCommand": "sudo corepack enable && yarn && yarn bootstrap", "customizations": { "vscode": { diff --git a/.gitpod.yml b/.gitpod.yml index 41f1305f96cd..ef4478947b2d 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,11 +1,17 @@ # Commands to start on workspace startup -# For reference, these env variables are set in the project settings: -# - YARN_CACHE_FOLDER=".yarn/cache" -# - YARN_ENABLE_GLOBAL_CACHE="false" +env: + # Avoids cross-link issues due to different filesystems between /home and /workspaces + YARN_GLOBAL_FOLDER: '.yarn/global' + YARN_CACHE_FOLDER: '.yarn/cache' + YARN_ENABLE_GLOBAL_CACHE: 'false' + # Avoids interactive prompt causing container creation to hang + COREPACK_ENABLE_DOWNLOAD_PROMPT: '0' + tasks: - init: | - yarn install - yarn build + corepack enable + yarn + yarn bootstrap command: | bash .gitpod/setup-git.sh gp sync-done prepare