pulumi/pkg
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
..
apitype Add missing annotation 2018-11-09 11:11:05 -08:00
backend Merge pull request #2191 from pulumi/chrsmith/fix-minor-issues 2018-11-12 10:33:17 -08:00
diag Support colors in CI/CD environments (#2094) 2018-10-24 14:45:15 -07:00
encoding Add license headers 2018-05-22 15:02:47 -07:00
engine Adopt golangci-lint and address issues 2018-11-08 14:11:47 -08:00
graph Add license headers 2018-05-22 15:02:47 -07:00
operations Fix log retrieval for lambdas. (#2160) 2018-11-05 12:27:11 -08:00
resource Adopt golangci-lint and address issues 2018-11-08 14:11:47 -08:00
testing Don't write a lock file when installing test packages 2018-11-08 12:09:10 -08:00
tokens Adopt golangci-lint and address issues 2018-11-08 14:11:47 -08:00
tools Add a `WriteString` method to `tools/GenWriter`. (#1839) 2018-08-29 14:43:20 -07:00
util Add CircleCI support (#2143) 2018-11-01 11:20:31 -07:00
version Add license headers 2018-05-22 15:02:47 -07:00
workspace Fix an issue where plugin install would fail on windows 2018-11-16 20:07:24 -08:00