Merge pull request #25990 from hashicorp/alisdair/clean-up-provider-tempfile
internal: Clean up package install temp file
This commit is contained in:
commit
aca6ce3c4d
|
@ -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