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