Skip to content

Commit

Permalink
Inject $WORKSPACE_DIR into container
Browse files Browse the repository at this point in the history
This permits users to check ZMK out into arbitrarily-named directories
  • Loading branch information
idan committed Oct 10, 2020
1 parent db40fba commit 63ad5b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .devcontainer/.bashrc
Original file line number Diff line number Diff line change
@@ -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 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}"}
}

0 comments on commit 63ad5b7

Please sign in to comment.