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