mirror of https://github.com/docker/cli.git
Partial fix for #2648 on Windows only.
Signed-off-by: Eric <ericwj@users.noreply.github.com>
This commit is contained in:
parent
280e7230d5
commit
c2e2c0b9f6
|
@ -280,13 +280,9 @@ func ResolveAndValidateContextPath(givenContextDir string) (string, error) {
|
|||
}
|
||||
|
||||
// The context dir might be a symbolic link, so follow it to the actual
|
||||
// target directory.
|
||||
//
|
||||
// FIXME. We use isUNC (always false on non-Windows platforms) to workaround
|
||||
// an issue in golang. On Windows, EvalSymLinks does not work on UNC file
|
||||
// paths (those starting with \\). This hack means that when using links
|
||||
// on UNC paths, they will not be followed.
|
||||
if !isUNC(absContextDir) {
|
||||
// target directory. This still forgets the configured context directory,
|
||||
// but leave this for now on *nix only.
|
||||
if runtime.GOOS != "windows" {
|
||||
absContextDir, err = filepath.EvalSymlinks(absContextDir)
|
||||
if err != nil {
|
||||
return "", errors.Errorf("unable to evaluate symlinks in context path: %v", err)
|
||||
|
|
Loading…
Reference in New Issue