Skip to content

Commit

Permalink
Restore Linux compatibility
Browse files Browse the repository at this point in the history
A previous commit attempted to use a sed invocation that would work on
OSX and Linux. But it doesn't. The wisdom of StackOverflow is that
there is no such invocation if you want to use in-place editing. We
can work around this somehow by not doing in-place, but I'm going to
leave that until someone actually needs to run this on OSX again.
  • Loading branch information
benbc committed Nov 2, 2016
1 parent ec66097 commit 7b14832
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ docker_run() {

docker_compose_up() {
local l_image="$1" l_cname="$2" l_composefile="$3"; shift; shift; shift
sed -i '' -e "s|image: .*|image: ${l_image}|g" "${l_composefile}"
sed -i '' -e "s|container_name: .*|container_name: ${l_cname}|g" "${l_composefile}"
sed --in-place -e "s|image: .*|image: ${l_image}|g" "${l_composefile}"
sed --in-place -e "s|container_name: .*|container_name: ${l_cname}|g" "${l_composefile}"

docker-compose --file "${l_composefile}" --project-name test up -d
trap "docker-compose --file ${l_composefile} down" EXIT
Expand Down

0 comments on commit 7b14832

Please sign in to comment.