From 1ae6bc112826a9a7949904c5baa3e35d15119029 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=A5=E6=B5=A9?= Date: Sat, 28 Mar 2026 18:07:32 +0800 Subject: [PATCH] chore: update lifecycle scripts paths in devcontainer configuration --- .devcontainer/devcontainer.json | 15 +++++++-------- .../lifecycle-scripts.d/04-postStartCommand.d/- | 10 +++++----- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 7f5f54d..f8dbadc 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -26,14 +26,13 @@ } }, "mounts": [ - "source=${localWorkspaceFolderBasename}-node_modules,target=${containerWorkspaceFolder}/node_modules,type=volume", - "source=${localWorkspaceFolder}/.devcontainer/lifecycle-scripts.d,target=/usr/local/etc/lifecycle-scripts.d,type=bind,consistency=delegated" + "source=${localWorkspaceFolderBasename}-node_modules,target=${containerWorkspaceFolder}/node_modules,type=volume" ], "workspaceMount": "source=${localWorkspaceFolder},target=/workspaces/${localWorkspaceFolderBasename},type=bind,consistency=delegated", - "initializeCommand": "docker pull ghcr.io/yanhao98/h-devcontainer:main;", - "onCreateCommand": "/usr/local/bin/run-lifecycle-scripts.sh onCreateCommand", - "updateContentCommand": "/usr/local/bin/run-lifecycle-scripts.sh updateContentCommand", - "postCreateCommand": "/usr/local/bin/run-lifecycle-scripts.sh postCreateCommand", - "postStartCommand": "/usr/local/bin/run-lifecycle-scripts.sh postStartCommand", - "postAttachCommand": "/usr/local/bin/run-lifecycle-scripts.sh postAttachCommand" + // "initializeCommand": "docker pull ghcr.io/yanhao98/h-devcontainer:main;", + "onCreateCommand": "/devcontainer/run-lifecycle-scripts.sh onCreateCommand", + "updateContentCommand": "/devcontainer/run-lifecycle-scripts.sh updateContentCommand", + "postCreateCommand": "/devcontainer/run-lifecycle-scripts.sh postCreateCommand", + "postStartCommand": "/devcontainer/run-lifecycle-scripts.sh postStartCommand", + "postAttachCommand": "/devcontainer/run-lifecycle-scripts.sh postAttachCommand" } diff --git a/.devcontainer/lifecycle-scripts.d/04-postStartCommand.d/- b/.devcontainer/lifecycle-scripts.d/04-postStartCommand.d/- index 67352e0..8887d7d 100755 --- a/.devcontainer/lifecycle-scripts.d/04-postStartCommand.d/- +++ b/.devcontainer/lifecycle-scripts.d/04-postStartCommand.d/- @@ -1,13 +1,13 @@ #!/bin/zsh -eu h-setup-zh-locale -h-setup-bun-bin -h-setup-pnpm-bin +# h-setup-bun-bin +# h-setup-pnpm-bin -h-setup-chromium -h-setup-desktop-lite +# h-setup-chromium +# h-setup-desktop-lite -h-install-node-modules +h-smart-install-node-modules echo "-----------------------------" echo "开发容器已启动并配置完成!"