From e6783b3c12f51e94234b8c0f436709765a7aa655 Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Wed, 24 Jan 2024 00:23:12 +0000 Subject: [PATCH] feat: even more ricing of the devcontainer Signed-off-by: Devin Buhl --- .devcontainer/devcontainer.json | 5 ++--- .devcontainer/postCreateCommand.sh | 9 ++++++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index d73602a2..0c46abf8 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,7 +2,6 @@ "$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.schema.json", "name": "Flux Cluster Template", "image": "ghcr.io/onedr0p/flux-cluster-template/devcontainer:base", - "postCreateCommand": { - "deps": "${containerWorkspaceFolder}/.devcontainer/postCreateCommand.sh" - } + "postCreateCommand": "bash ${containerWorkspaceFolder}/.devcontainer/postCreateCommand.sh", + "postStartCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}" } diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh index 00a6c8b3..7dd3eda0 100755 --- a/.devcontainer/postCreateCommand.sh +++ b/.devcontainer/postCreateCommand.sh @@ -15,6 +15,13 @@ tee ~/.config/fish/conf.d/starship.fish > /dev/null < /dev/null < ~/.config/fish/completions/stern.fish yq shell-completion fish > ~/.config/fish/completions/yq.fish # Create/update virtual environment -if ! grep -q "/workspaces/flux-template-cluster/.venv" .venv/pyvenv.cfg; then +if ! grep -q "venv /workspaces/" .venv/pyvenv.cfg; then rm -rf .venv fi task workstation:venv