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

Manually edited .upt file cannot be read #8

Closed
christophe-kamphaus-jemmic opened this issue Jun 1, 2023 · 0 comments · Fixed by #9
Closed

Manually edited .upt file cannot be read #8

christophe-kamphaus-jemmic opened this issue Jun 1, 2023 · 0 comments · Fixed by #9
Assignees

Comments

@christophe-kamphaus-jemmic
Copy link
Collaborator

christophe-kamphaus-jemmic commented Jun 1, 2023

If the ~/.upt file was edited manually (eg. with vim) then upt cannot parse it even if the datetime format is valid.

upt should first trim the file content before trying to parse the datetime.
If the format is invalid, print an error to stderr.

File IO errors should also be printed to stderr. Only file not found can be ignored silently.

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 a pull request may close this issue.

1 participant