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

Fix dynamic key creation #400

Merged
merged 1 commit into from
Jun 5, 2018
Merged

Conversation

bdwyertech
Copy link
Contributor

Was seeing a weird issue where Ruby was trying to write to the file before it had actually been created on the file system.... Lost the error output, but it was something along the lines of File not open for writing

Moving this all into one code block has resolved the issue.

@coderanger
Copy link
Contributor

Hmm, now I'm trying to remember why I did that.

@cheeseplus
Copy link
Contributor

Semi-related: #399

@bdwyertech
Copy link
Contributor Author

That's the exact error I was seeing @cheeseplus ... Idk why the tests see this as not creating the file... File.open is just File.new which accepts a block. Guess I'll dick around with this on my Mac next week.

@bdwyertech
Copy link
Contributor Author

@coderanger maybe because Ruby was weird at the time regarding file permissions and File.open vs File.new? Who knows. There was a little comment in-line above about syscall and file permissions, but this seems to achieve the same, tested on the Mac too.

Copy link
Contributor

@cheeseplus cheeseplus left a comment

Choose a reason for hiding this comment

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

LGTM, @coderanger?

Copy link
Contributor

@coderanger coderanger left a comment

Choose a reason for hiding this comment

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

Yeah, I still have no idea what I was thinking so hopefully this is better :D

@coderanger coderanger merged commit 1f6311a into test-kitchen:master Jun 5, 2018
@bdwyertech bdwyertech deleted the windows-fix branch June 5, 2018 14:26
@jjasghar
Copy link

I just ran into an issue with this, this fixed it. Can we get this released in a new gem?

@cheeseplus
Copy link
Contributor

#402

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.

4 participants