internal: Clean up package install temp file
The installFromHTTPURL function downloads a package to a temporary file, then delegates to installFromLocalArchive to install it. We were previously not deleting the temporary file afterwards. This commit fixes that.
This commit is contained in:
parent
b1eec0fbcd
commit
915f53af23
|
@ -53,6 +53,7 @@ func installFromHTTPURL(ctx context.Context, meta getproviders.PackageMeta, targ
|
||||||
return nil, fmt.Errorf("failed to open temporary file to download from %s", url)
|
return nil, fmt.Errorf("failed to open temporary file to download from %s", url)
|
||||||
}
|
}
|
||||||
defer f.Close()
|
defer f.Close()
|
||||||
|
defer os.Remove(f.Name())
|
||||||
|
|
||||||
// We'll borrow go-getter's "cancelable copy" implementation here so that
|
// We'll borrow go-getter's "cancelable copy" implementation here so that
|
||||||
// the download can potentially be interrupted partway through.
|
// the download can potentially be interrupted partway through.
|
||||||
|
|
Loading…
Reference in New Issue