mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
release/dist: remove extra Close on a signed file (#9094)
We pass the file as an io.Reader to http.Post under the hood as request body. Post, helpfully, detects that the body is an io.Closer and closes it. So when we try to explicitly close it again, we get "file already closed" error. The Close there is not load-bearing, we have a defer for it anyway. Remove the explicit close and error check. Updates #cleanup Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
This commit is contained in:
parent
4828e4c2db
commit
ce5909dafc
3
release/dist/dist.go
vendored
3
release/dist/dist.go
vendored
@ -45,9 +45,6 @@ func (s Signer) SignFile(filePath, sigPath string) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := f.Close(); err != nil {
|
||||
return err
|
||||
}
|
||||
return os.WriteFile(sigPath, sig, 0644)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user