diff --git a/.devcontainer/.bashrc b/.devcontainer/.bashrc index 6a6ea691..855ea755 100644 --- a/.devcontainer/.bashrc +++ b/.devcontainer/.bashrc @@ -1,6 +1,6 @@ export LS_OPTIONS='-F --color=auto' eval "`dircolors`" alias ls='ls $LS_OPTIONS' -if [ -f /workspaces/zmk/zephyr/zephyr-env.sh ]; then - source /workspaces/zmk/zephyr/zephyr-env.sh +if [ -f "$WORKSPACE_DIR/zephyr/zephyr-env.sh" ]; then + source "$WORKSPACE_DIR/zephyr/zephyr-env.sh" fi diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index f21465df..940b78b8 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,6 +2,7 @@ "name": "ZMK Development", "dockerFile": "Dockerfile", "extensions": ["ms-vscode.cpptools"], - "runArgs": ["--security-opt", "label=disable"] + "runArgs": ["--security-opt", "label=disable"], + "containerEnv": {"WORKSPACE_DIR": "${containerWorkspaceFolder}"} }