Explorar o código

add f.Close() after dockerignore.ReadAll(f) before return err
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

lixiaobing10051267 %!s(int64=8) %!d(string=hai) anos
pai
achega
3072fce067
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      builder/remotecontext/detect.go

+ 1 - 0
builder/remotecontext/detect.go

@@ -131,6 +131,7 @@ func removeDockerfile(c modifiableContext, filesToRemove ...string) error {
 	}
 	excludes, err := dockerignore.ReadAll(f)
 	if err != nil {
+		f.Close()
 		return err
 	}
 	f.Close()