pulumi/pkg/workspace
Matt Ellis faff805f1e Fix an issue where plugin install would fail on windows
The issue is related to this code:

https://github.com/pulumi/pulumi/blob/v0.16.4/pkg/workspace/plugins.go#L155-L195

Note that we use `defer` to ensure we close our handle to the file we
are unpacking when we encounter a file in the tarball.  However, the
defers don't run until the containing function ends, so when we go to
do the rename, or process still has a bunch of open file handles, which
prevents the directory from being renamed because it is "in use".

By doing all of the work in an anonymous function, we ensure that the
defer statements run before we go to rename the directory

Fixes #2217
2018-11-16 20:07:24 -08:00
..
creds.go Add license headers 2018-05-22 15:02:47 -07:00
paths.go Tidy up some data structures (#2135) 2018-11-01 08:28:11 -07:00
plugins.go Fix an issue where plugin install would fail on windows 2018-11-16 20:07:24 -08:00
project.go Adopt golangci-lint and address issues 2018-11-08 14:11:47 -08:00
project_test.go Allow more types for runtimeOptions 2018-08-06 14:00:58 -07:00
settings.go Tidy up some data structures (#2135) 2018-11-01 08:28:11 -07:00
templates.go Move away from ${PROJECT} and ${DESCRIPTION} (#1873) 2018-09-05 08:00:57 -07:00
templates_test.go Add license headers 2018-05-22 15:02:47 -07:00
workspace.go Adopt golangci-lint and address issues 2018-11-08 14:11:47 -08:00