Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: avoid cross-link issues in devcontainer and gitpod #7483

Merged
merged 4 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading