Skip to content

Commit

Permalink
Fix Docker on windows does not support mount with short filename
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-igrychev committed Jan 23, 2020
1 parent c99ae51 commit 9e30889
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pkg/testing/utils/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func GetTempDir() string {
dir, err := ioutil.TempDir("", "werf-integration-tests-")
Ω(err).ShouldNot(HaveOccurred())

if runtime.GOOS == "darwin" {
if runtime.GOOS == "darwin" || runtime.GOOS == "windows" {
dir, err = filepath.EvalSymlinks(dir)
Ω(err).ShouldNot(HaveOccurred(), fmt.Sprintf("eval symlinks of path %s failed: %s", dir, err))
}
Expand Down
9 changes: 0 additions & 9 deletions pkg/tmp_manager/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"io/ioutil"
"os"
"path/filepath"
"runtime"

"github.com/flant/werf/pkg/werf"
)
Expand Down Expand Up @@ -100,13 +99,5 @@ func newTmpFile(prefix string) (string, error) {
return "", err
}

if runtime.GOOS == "darwin" {
dir, err := filepath.EvalSymlinks(path)
if err != nil {
return "", fmt.Errorf("eval symlinks of path %s failed: %s", path, err)
}
path = dir
}

return path, nil
}
2 changes: 1 addition & 1 deletion pkg/werf/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func Init(tmpDirOption, homeDirOption string) error {
tmpDir = os.TempDir()
}

if runtime.GOOS == "darwin" {
if runtime.GOOS == "darwin" || runtime.GOOS == "windows" {
dir, err := filepath.EvalSymlinks(tmpDir)
if err != nil {
return fmt.Errorf("eval symlinks of path %s failed: %s", tmpDir, err)
Expand Down

0 comments on commit 9e30889

Please sign in to comment.