浏览代码

Fix Yarn version in devcontainer (#27788)

Michael Stanclift 6 月之前
父节点
当前提交
b87bfb8c96
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. 1 1
      .devcontainer/Dockerfile
  2. 1 0
      .devcontainer/post-create.sh

+ 1 - 1
.devcontainer/Dockerfile

@@ -15,6 +15,6 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
 RUN gem install foreman
 
 # [Optional] Uncomment this line to install global node packages.
-RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g yarn" 2>&1
+RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && corepack enable" 2>&1
 
 COPY welcome-message.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt

+ 1 - 0
.devcontainer/post-create.sh

@@ -11,6 +11,7 @@ bundle install
 git checkout -- Gemfile.lock
 
 # Fetch Javascript dependencies
+corepack prepare
 yarn install --immutable
 
 # [re]create, migrate, and seed the test database