Skip to content

Commit

Permalink
Fix docker-compose executable check for Win10 (#461)
Browse files Browse the repository at this point in the history
* Use .exe suffix on Windows when looking for docker-compose executable 

Fixes #460
  • Loading branch information
bsnisar authored and kiview committed Sep 29, 2017
1 parent 0da7fca commit 540f567
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ All notable changes to this project will be documented in this file.

## UNRELEASED
### Fixed
- Fixed local Docker Compose executable name resolution on Windows (#416)
- Fixed local Docker Compose executable name resolution on Windows (#416, #460)
- Fixed TAR composition on Windows (#444)
- Allowing `addExposedPort` to be used after ports have been specified with `withExposedPorts` (#453)
- Stopping creation of temporary directory prior to creating temporary file (#443)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ public DockerCompose withEnv(Map<String, String> env) {
@Override
public void invoke() {
// bail out early
if (!CommandLine.executableExists(COMPOSE_EXECUTABLE)) {
if (!dockerComposeExecutableExists()) {
throw new ContainerLaunchException("Local Docker Compose not found. Is " + COMPOSE_EXECUTABLE + " on the PATH?");
}

Expand Down Expand Up @@ -531,6 +531,14 @@ public void invoke() {
}
}

private boolean dockerComposeExecutableExists() {
if (SystemUtils.IS_OS_WINDOWS) {
return CommandLine.executableExists(COMPOSE_EXECUTABLE + ".exe");
} else {
return CommandLine.executableExists(COMPOSE_EXECUTABLE);
}
}

/**
* @return a logger
*/
Expand Down

0 comments on commit 540f567

Please sign in to comment.