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

exits successfully($? is 0) when it fails to create notes #55

Closed
rmNULL opened this issue Mar 15, 2018 · 2 comments · Fixed by #56
Closed

exits successfully($? is 0) when it fails to create notes #55

rmNULL opened this issue Mar 15, 2018 · 2 comments · Fixed by #56

Comments

@rmNULL
Copy link
Contributor

rmNULL commented Mar 15, 2018

Issue Summary

When $NOTES_DIRECTORY is set to a filename, that already exists in the directory.
It opens a new note but fails to save it, and exits 0
(as the exit status depends on the editor)

Steps to Reproduce

  1. touch /tmp/secret
  2. env NOTES_DIRECTORY=/tmp/secret notes n leaks
  3. edit and save(fails to save), quit forcefully.
  4. Once you are back at shell, echo $?

Expected Behavior

exit before opening the editor and ask user to set NOTES_DIRECTORY to a safe location.
ofc, exit with non-zero status

@pimterry
Copy link
Owner

So to be clear, you'd like new & open to check in advance whether NOTES_DIRECTORY is actually a directory, right? Sounds sensible to me if so, I'd accept a PR.

@rmNULL
Copy link
Contributor Author

rmNULL commented Mar 15, 2018

I feel it would be better if we check after reading the configuration file.

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.

2 participants