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

getDiskStats should be more robust to df failures #39

Closed
adamgundry opened this issue Aug 10, 2022 · 0 comments · Fixed by #41
Closed

getDiskStats should be more robust to df failures #39

adamgundry opened this issue Aug 10, 2022 · 0 comments · Fixed by #41

Comments

@adamgundry
Copy link

My local df command emits an error df: /run/user/1000/doc: Operation not permitted and returns an exit code of 1. (I'm not sure why.) It still produces useful output on stdout.

Since getDiskStats in Ridley uses readProcess, it will pass through stderr to the parent process, and will throw an exception when df returns a non-zero exit code. Instead, using readProcessWithExitCode would allow the exit code to be logged but not treated as a complete failure. Moreover the stderr output could be logged normally rather than being passed through to the parent process.

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