Skip to content

Commit

Permalink
Merge pull request #307 from hyperledger/prioritise_docker_composev2
Browse files Browse the repository at this point in the history
Prioritise docker compose v2
  • Loading branch information
EnriqueL8 authored Jun 17, 2024
2 parents 9c8b5dd + 0038c76 commit 10122f8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ jobs:
- name: Run E2E tests
working-directory: firefly
env:
DOWNLOAD_CLI: false
TEST_SUITE: ${{ matrix.test-suite }}
STACK_TYPE: ${{ matrix.stack-type }}
BLOCKCHAIN_CONNECTOR: ${{ matrix.blockchain-connector }}
Expand Down
12 changes: 6 additions & 6 deletions internal/docker/docker_checks.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@ func CheckDockerConfig() (DockerComposeVersion, error) {
return None, fmt.Errorf("an error occurred while running docker. Is docker running on your computer?")
}

// check for docker-compose (v1) version
dockerComposeCmd := exec.Command("docker-compose", "-v")
// check for docker-compose (V2) version
dockerComposeCmd := exec.Command("docker", "compose", "version")
_, err = dockerComposeCmd.Output()
if err == nil {
return ComposeV1, nil
return ComposeV2, nil
}

// check for docker-compose (V2) version
dockerComposeCmd = exec.Command("docker", "compose", "version")
// check for docker-compose (v1) version
dockerComposeCmd = exec.Command("docker-compose", "-v")
_, err = dockerComposeCmd.Output()
if err == nil {
return ComposeV2, nil
return ComposeV1, nil
}

return None, fmt.Errorf("an error occurred while running docker-compose. Is docker-compose installed on your computer?")
Expand Down

0 comments on commit 10122f8

Please sign in to comment.