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 bug for new --list --format options when no default journal is specified #1621

Merged
merged 5 commits into from Oct 22, 2022

Conversation

wren
Copy link
Member

@wren wren commented Oct 22, 2022

Fixes #1445

While testing the beta, we found an issue where a command like jrnl --list --format json wouldn't work if no default journal is defined in the config (even though jrnl --list doesn't require a journal name). This fixes that issue, and also fixes seeing that same error when running jrnl --list normally.

Checklist

  • I have read the contributing doc.
  • I have included a link to the relevant issue number.
  • I have checked to ensure there aren't other open pull requests
    for the same issue.
  • I have written new tests for these changes, as needed.

wren and others added 5 commits October 22, 2022 13:08
Journal name validation used to happen before postconfig commands could
have a chance to run, so now each command is responsible for its own
error-checking of the journal name.

Added a new decorator and function that makes this error-checking easier.

Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
@micahellison micahellison added the bug Something isn't working label Oct 22, 2022
Copy link
Member

@micahellison micahellison left a comment

Choose a reason for hiding this comment

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

💯

@micahellison micahellison merged commit 63850a3 into jrnl-org:develop Oct 22, 2022
@micahellison micahellison deleted the no-default-journal-1445 branch October 22, 2022 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add machine-readable format for --list
2 participants