Skip to content
This repository was archived by the owner on Jun 26, 2023. It is now read-only.

Commit 5a82a9d

Browse files
authored
revert "feat: set config path (#4)" (#6)
This reverts commit f37f760.
1 parent f37f760 commit 5a82a9d

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

wrapper.go

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ package wrapper
33
import (
44
"bytes"
55
"errors"
6-
"fmt"
7-
"os"
86
"os/exec"
97
)
108

@@ -28,17 +26,17 @@ func NewComposeWrapper(binaryPath string) (*ComposeWrapper, error) {
2826
}
2927

3028
// Up create and start containers
31-
func (wrapper *ComposeWrapper) Up(filePath, url, projectName, envFilePath, configPath string) ([]byte, error) {
32-
return wrapper.Command(newUpCommand(filePath), url, projectName, envFilePath, configPath)
29+
func (wrapper *ComposeWrapper) Up(filePath, url, projectName, envFilePath string) ([]byte, error) {
30+
return wrapper.Command(newUpCommand(filePath), url, projectName, envFilePath)
3331
}
3432

3533
// Down stop and remove containers
3634
func (wrapper *ComposeWrapper) Down(filePath, url, projectName string) ([]byte, error) {
37-
return wrapper.Command(newDownCommand(filePath), url, projectName, "", "")
35+
return wrapper.Command(newDownCommand(filePath), url, projectName, "")
3836
}
3937

4038
// Command exectue a docker-compose commanåd
41-
func (wrapper *ComposeWrapper) Command(command composeCommand, url, projectName, envFilePath, configPath string) ([]byte, error) {
39+
func (wrapper *ComposeWrapper) Command(command composeCommand, url, projectName, envFilePath string) ([]byte, error) {
4240
program := programPath(wrapper.binaryPath, "docker-compose")
4341

4442
if projectName != "" {
@@ -55,12 +53,6 @@ func (wrapper *ComposeWrapper) Command(command composeCommand, url, projectName,
5553

5654
var stderr bytes.Buffer
5755
cmd := exec.Command(program, command.ToArgs()...)
58-
59-
if configPath != "" {
60-
cmd.Env = os.Environ()
61-
cmd.Env = append(cmd.Env, fmt.Sprintf("DOCKER_CONFIG=%s", configPath))
62-
}
63-
6456
cmd.Stderr = &stderr
6557

6658
output, err := cmd.Output()

0 commit comments

Comments
 (0)