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 directory existence test on Windows #424

Merged
merged 3 commits into from
Apr 28, 2022
Merged

Conversation

thll
Copy link
Contributor

@thll thll commented Apr 5, 2022

The test if a directory exists is currently broken on Windows. This leads to the sidecar not creating the parent directory for the configured node-id file if the directory doesn't exist yet.

This PR fixes that by using filepath.Dir instead of path.Dir.

Additionally, logging is improved by adding logging for unsuccessful attempts to write to the node-id file.

@thll thll force-pushed the improve-node-id-file-logging branch from 40a88e1 to 9a8ea77 Compare April 5, 2022 08:46
@thll thll changed the title Log error if node-id file can not be written Fix directory existence test on Windows Apr 5, 2022
@thll thll marked this pull request as ready for review April 5, 2022 12:11
@thll thll requested a review from mpfz0r April 5, 2022 12:11
Copy link
Contributor

@mpfz0r mpfz0r left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@mpfz0r mpfz0r merged commit 8b416ac into master Apr 28, 2022
@mpfz0r mpfz0r deleted the improve-node-id-file-logging branch April 28, 2022 18:02
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.

2 participants