Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting platform dependent docker-compose executable name #437

Merged
merged 3 commits into from
Aug 11, 2017
Merged

Setting platform dependent docker-compose executable name #437

merged 3 commits into from
Aug 11, 2017

Conversation

barrycommins
Copy link
Contributor

Fixes #416

@@ -464,7 +465,15 @@ public void invoke() {
/**
* Executable name for Docker Compose.
*/
private static final String COMPOSE_EXECUTABLE = "docker-compose";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would keep final and use something like SystemUtils.IS_OS_WINDOWS ? "docker-compose.exe" : "docker-compose"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @bsideup .
I was trying to stay consistent with this (although I missed that it was still final) :

private static final String executableName;
static {
if(SystemUtils.IS_OS_WINDOWS) {
executableName = "docker-machine.exe";
} else {
executableName = "docker-machine";
}
}

I agree that your version is cleaner. I'll update the PR with that change.

@@ -464,7 +465,7 @@ public void invoke() {
/**
* Executable name for Docker Compose.
*/
private static final String COMPOSE_EXECUTABLE = "docker-compose";
private static final String composeExecutable = SystemUtils.IS_OS_WINDOWS ? "docker-compose.exe" : "docker-compose";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please also revert the variable name change?

@@ -9,6 +9,7 @@
import com.google.common.collect.Maps;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also mention the change in CHANGELOG.md :)

@bsideup bsideup merged commit 1a04781 into testcontainers:master Aug 11, 2017
@bsideup
Copy link
Member

bsideup commented Aug 11, 2017

Great, thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants