Merge pull request #7615 from crosbymichael/fix-utils-panic
Fix panic in validate context for build Upstream-commit: 63ed18ad11a0ae563a3b75af4c6660e63667f896 Component: engine
This commit is contained in:
@ -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