Skip to content

Commit

Permalink
compose: recognize CWD
Browse files Browse the repository at this point in the history
  • Loading branch information
legobeat committed Aug 13, 2024
1 parent 6274b64 commit 3e686eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ services:
networks:
internal:
container-control:
working_dir: "${SRC_DIR:-${L7_SRC_DIR:-/src}}"
working_dir: "${CWD:-${SRC_DIR:-${L7_SRC_DIR:-/src}}}"
# TODO: mounts for config could be done as configs
# https://github.com/compose-spec/compose-spec/blob/master/08-configs.md
volumes:
Expand Down
2 changes: 1 addition & 1 deletion devenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ fi

# default workdir to pwd if within SRC_DIR or /src; otherwise SRC_DIR
if [ -z "${CWD}" ]; then
case $PWD/ in
case "${PWD}/" in
${SRC_DIR}/*) export CWD="${PWD}";;
/src/*) export CWD="${PWD}";;
*) export CWD="${SRC_DIR}";;
Expand Down

0 comments on commit 3e686eb

Please sign in to comment.