-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Setting platform dependent docker-compose executable name #437
Conversation
@@ -464,7 +465,15 @@ public void invoke() { | |||
/** | |||
* Executable name for Docker Compose. | |||
*/ | |||
private static final String COMPOSE_EXECUTABLE = "docker-compose"; |
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
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) :
testcontainers-java/core/src/main/java/org/testcontainers/utility/DockerMachineClient.java
Lines 24 to 31 in 32b6551
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"; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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 :)
Great, thanks! :) |
Fixes #416