Skip to content

Commit

Permalink
fix: avoid cross-link issues in devcontainer and gitpod (#7483)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCalzone authored Dec 12, 2024
1 parent 9d5e3fa commit c80a52d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
8 changes: 5 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
16 changes: 11 additions & 5 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit c80a52d

Please sign in to comment.