Skip to content

Commit c2e2c0b

Browse files
committed
Partial fix for #2648 on Windows only.
Signed-off-by: Eric <[email protected]>
1 parent 280e723 commit c2e2c0b

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

cli/command/image/build/context.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -280,13 +280,9 @@ func ResolveAndValidateContextPath(givenContextDir string) (string, error) {
280280
}
281281

282282
// The context dir might be a symbolic link, so follow it to the actual
283-
// target directory.
284-
//
285-
// FIXME. We use isUNC (always false on non-Windows platforms) to workaround
286-
// an issue in golang. On Windows, EvalSymLinks does not work on UNC file
287-
// paths (those starting with \\). This hack means that when using links
288-
// on UNC paths, they will not be followed.
289-
if !isUNC(absContextDir) {
283+
// target directory. This still forgets the configured context directory,
284+
// but leave this for now on *nix only.
285+
if runtime.GOOS != "windows" {
290286
absContextDir, err = filepath.EvalSymlinks(absContextDir)
291287
if err != nil {
292288
return "", errors.Errorf("unable to evaluate symlinks in context path: %v", err)

0 commit comments

Comments
 (0)