Browse Source

Inject $WORKSPACE_DIR into container

This permits users to check ZMK out into arbitrarily-named directories
xmkb
Idan Gazit 4 years ago
parent
commit
63ad5b7c08
No known key found for this signature in database
GPG Key ID: FA1E9B15C71BD7FC
  1. 4
      .devcontainer/.bashrc
  2. 3
      .devcontainer/devcontainer.json

4
.devcontainer/.bashrc

@ -1,6 +1,6 @@ @@ -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

3
.devcontainer/devcontainer.json

@ -2,6 +2,7 @@ @@ -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}"}
}

Loading…
Cancel
Save