From dbaf9a1c46f01f98e0afa06f8223f6c8a2ad9db8 Mon Sep 17 00:00:00 2001 From: Tom X Nguyen Date: Wed, 11 Oct 2023 23:48:28 +0700 Subject: [PATCH] perf: run postStartCommands in parallel --- .devcontainer/devcontainer.json | 5 ++++- .devcontainer/postStartCommand.sh | 8 -------- 2 files changed, 4 insertions(+), 9 deletions(-) delete mode 100755 .devcontainer/postStartCommand.sh diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index a830b53..c2dee46 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -38,7 +38,10 @@ "postCreateCommand": "./.devcontainer/postCreateCommand.sh", // Use 'postStartCommand' to run commands after the container starts. - "postStartCommand": "./.devcontainer/postStartCommand.sh", + "postStartCommand": { + "safeDir": "git config --global --add safe.directory ${containerWorkspaceFolder}", + "updateIndex": "git update-index --assume-unchanged .npmrc" + }, // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. "remoteUser": "node" diff --git a/.devcontainer/postStartCommand.sh b/.devcontainer/postStartCommand.sh deleted file mode 100755 index ad365be..0000000 --- a/.devcontainer/postStartCommand.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -# since this is our devcontainer, make it a safe dir for dubious ownership -# https://nvd.nist.gov/vuln/detail/cve-2022-24765 -git config --global --add safe.directory ${containerWorkspaceFolder} - -# remove .npmrc from the git index -git update-index --assume-unchanged .npmrc