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

Kubeconfig save/merge fix. #30

Merged
merged 2 commits into from Oct 16, 2020
Merged

Conversation

Johannestegner
Copy link
Contributor

@Johannestegner Johannestegner commented Oct 16, 2020

This is a minor fix to a bug I encounter on windows, I'm unsure if it exists on linux or osx, but it should due to why it breaks on windows!

When the temporary file is to be deleted, it is not yet closed (the close command is deferred and seems to not invoke on delete), so this fix closes the file before the removal command.

I also appended the error in the none-windows remove code (to keep the messages as similar as possible).


Edit:

Removed the windows specific file removal snippet too, as the os.Remove is OS agnostic and works fine on windows :)

…re trying to remove it.

Signed-off-by: Johannes Tegnér <johannes@jitesoft.com>
Signed-off-by: Johannes Tegnér <johannes@jitesoft.com>
@alejandrojnm alejandrojnm merged commit b59581e into civo:master Oct 16, 2020
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.

None yet

2 participants