Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: scott-vsi <[email protected]>
  • Loading branch information
andyneff and scott-vsi authored Feb 21, 2024
1 parent c5b0da1 commit 199036a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions linux/just_files/just_docker_functions.bsh
Original file line number Diff line number Diff line change
Expand Up @@ -530,9 +530,9 @@ function docker_defaultify()

docker-compose_debug) # Run docker buildx debug build against a \
# docker-compose service. $1 - service name (required) $2 - docker context, defaults to "."
# These are not a perfect parse? Won't handle yaml strings that aren't the same syntax as bash strings
# This is not a perfect parser. Won't handle yaml strings that aren't the same syntax as bash strings
local compose_config=$(docker-compose config | yarp)
# This shouldn't be blank, as if it's absent in the compose file, docker-compose will report "Dockerfile" still
# This shouldn't be blank, because docker-compose will report "Dockerfile" even if it's absent in the compose file```
local dockerfile=$(sed -nE 's|^services\.'"$1"'\.build\.dockerfile = "?(.*[^"])"?|\1|p' <<< "${compose_config}")
if [ -z "${dockerfile}" ]; then
echo "Dockerfile is empty, either you forgot to specify a service name or specified the wrong service" >&2
Expand Down

0 comments on commit 199036a

Please sign in to comment.