Yaml export errors now don't show stack trace (#1449)

* Yaml export errors now don't show stacktrace

* Add test for user-friendly error when exporting YAML to a nonexistent directory

* Leave partially written to files after export error

* unskip working tests

Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
This commit is contained in:
Kevin 2022-05-07 11:11:00 -07:00 committed by GitHub
parent 048c9d40e7
commit 74200f8dc4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 8 deletions

View file

@ -425,6 +425,20 @@ Feature: Custom formats
| basic_folder.yaml |
# | basic_dayone.yaml |
Scenario Outline: Exporting YAML to nonexistent directory leads to user-friendly error with no traceback
Given we use the config "<config_file>"
And we use the password "test" if prompted
When we run "jrnl --export yaml --file nonexistent_dir"
Then the output should contain "YAML export must be to individual files"
And the output should not contain "Traceback"
Examples: configs
| config_file |
| basic_onefile.yaml |
| basic_encrypted.yaml |
| basic_folder.yaml |
| basic_dayone.yaml |
@skip_win # @todo YAML exporter does not correctly export emoji on Windows
Scenario Outline: Add a blank line to YAML export if there isn't one already
# https://github.com/jrnl-org/jrnl/issues/768