mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-05 21:21:42 +00:00
Fix panic in validate context for build
Fixes #7611 Signed-off-by: Michael Crosby <michael@docker.com>
This commit is contained in:
+1
-1
@@ -644,7 +644,7 @@ func ValidateContextDirectory(srcPath string, excludes []string) error {
|
||||
// skip checking if symlinks point to non-existing files, such symlinks can be useful
|
||||
// also skip named pipes, because they hanging on open
|
||||
lstat, _ := os.Lstat(filePath)
|
||||
if lstat.Mode()&(os.ModeSymlink|os.ModeNamedPipe) != 0 {
|
||||
if lstat != nil && lstat.Mode()&(os.ModeSymlink|os.ModeNamedPipe) != 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user