Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-apply #5857 #5893

Merged
merged 2 commits into from
Dec 9, 2020
Merged

Re-apply #5857 #5893

merged 2 commits into from
Dec 9, 2020

Conversation

lukehoban
Copy link
Member

@lukehoban lukehoban commented Dec 8, 2020

This re-applies the fix in #5857 to make credentials.json writes concurrency safe.

The original fix used path.Dir instead of filepath.Dir - which led to not placing the temp file in the same folder (and drive) as the renamed file target on Windows. This led to errors on Windows environments where the working directory was on a different drive than the ~/.pulumi directory (#5879).

The change to use filepath.Dir instead ensures that even on Windows, the true directory containing the credentials file is used for the temp file as well.

Fixes #3877.

This re-applies the fix in 5857 to make credentials.json writes concurrency safe.

The original fix used `path.Dir` instead of `filepath.Dir` - which led to not placing the temp file in the same folder (and drive) as the renamed file target.  This led to errors on Windows environments where the working directory was on a different drive than the `~/.pulumi` directory.  The change to use `filepath.Dir` instead ensures that even on Windows, the true directory containing the credentials file is used for the temp file as well.
Copy link
Member

@justinvp justinvp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lukehoban lukehoban merged commit b45b3ed into master Dec 9, 2020
@pulumi-bot pulumi-bot deleted the lukehoban/refix3877 branch December 9, 2020 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Malformed credentials file
2 participants