Netflix / dispatch-docker

Apache License 2.0
203 stars 86 forks source link

Docker Compose version requirement failing for 2.0.0+ #139

Closed Gurulhu closed 2 years ago

Gurulhu commented 2 years ago

Describe the bug Docker Compose --version line has changed from "docker-compose version x.x.x" to "Docker Compose version x.x.x" somewhere between 1.19 and 2.3. The current sed line breaks as it's expecting a strict string to parse.

To Reproduce Steps to reproduce the behavior:

  1. Set up Docker Compose 2.0 or newer on your environment
  2. Run ./install on this repo

Expected behavior The minimum requirement check fails when it shouldn't

Desktop (please complete the following information):

Additional context This can be fixed by changing the sed check on line 33 of the install.sh to awk -F "version " '{print $NF}' I'm checking if there are any breaking changes from 1 to 2 that needs fixing, and if it runs as expected I'll be opening a PR tagging this issue.

Gurulhu commented 2 years ago

Current sed line is: sed 's/docker-compose version (.{1,}),.*/\1/

Gurulhu commented 2 years ago

I failed to notice #138 and the grep line suggested there is better than the awk line I proposed for future-proofness. Closing this issue as it's redundant.