From cdc228f65a31dc0a4cfe2f1cd48d400cdf2b9b7f Mon Sep 17 00:00:00 2001 From: Rich Brown Date: Sun, 18 Aug 2024 20:40:45 -0400 Subject: [PATCH] Move git config ... add safe.directory to a script within .devcontainer --- .devcontainer/devcontainer.json | 3 ++- .devcontainer/post_create.sh | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .devcontainer/post_create.sh diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 9b68d4e8e25a..2caae4117e3f 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -43,6 +43,7 @@ "install-python-deps": "task install-maturin", // Disabling because of the issues in #3709 // "install-python-deps": "task install-maturin && task install-pre-commit && pre-commit install-hooks", - "install-npm-dependencies": "task install-npm-dependencies" + "install-npm-dependencies": "task install-npm-dependencies", + "other-post-create": "bash .devcontainer/post_create.sh" } } diff --git a/.devcontainer/post_create.sh b/.devcontainer/post_create.sh new file mode 100644 index 000000000000..7b62fd4ff019 --- /dev/null +++ b/.devcontainer/post_create.sh @@ -0,0 +1,9 @@ +#! /bin/sh +# +# Other postCreateCommands that should only run in the Dev Container environment +# Since these are called by the .devcontainer/devcontainer.json's `postCreateCommand` +# they won't affect people building the software natively + +git config --global --add safe.directory /workspaces/prql + +pip install pre-commit