File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
src/main/groovy/com/avast/gradle/dockercompose/tasks Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ class ComposeDown extends DefaultTask {
1919 void down () {
2020 if (extension. stopContainers) {
2121 project. exec { ExecSpec e ->
22+ e. environment = extension. environment
2223 e. commandLine extension. composeCommand(' stop' )
2324 }
2425 if (extension. removeContainers) {
@@ -36,10 +37,12 @@ class ComposeDown extends DefaultTask {
3637 args + = [' --volumes' ]
3738 }
3839 project. exec { ExecSpec e ->
40+ e. environment = extension. environment
3941 e. commandLine extension. composeCommand(args)
4042 }
4143 } else {
4244 project. exec { ExecSpec e ->
45+ e. environment = extension. environment
4346 e. commandLine extension. composeCommand(' rm' , ' -f' )
4447 }
4548 }
@@ -50,6 +53,7 @@ class ComposeDown extends DefaultTask {
5053 VersionNumber getDockerComposeVersion () {
5154 new ByteArrayOutputStream (). withStream { os ->
5255 project. exec { ExecSpec e ->
56+ e. environment = extension. environment
5357 e. commandLine extension. composeCommand(' --version' )
5458 e. standardOutput = os
5559 }
Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ class ComposeUp extends DefaultTask {
7979 String getContainerId (String serviceName ) {
8080 new ByteArrayOutputStream (). withStream { os ->
8181 project. exec { ExecSpec e ->
82+ e. environment = extension. environment
8283 e. commandLine extension. composeCommand(' ps' , ' -q' , serviceName)
8384 e. standardOutput = os
8485 }
You can’t perform that action at this time.
0 commit comments