From c2e2c0b9f6403200876f36edfed3f9d91e4f0d54 Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 23 Jul 2020 22:21:22 +0200 Subject: [PATCH] Partial fix for #2648 on Windows only. Signed-off-by: Eric --- cli/command/image/build/context.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/cli/command/image/build/context.go b/cli/command/image/build/context.go index 24a9d525b5..24e6b510bf 100644 --- a/cli/command/image/build/context.go +++ b/cli/command/image/build/context.go @@ -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)