-
Notifications
You must be signed in to change notification settings - Fork 68
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
feat: Add output to file option #221
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how easy it is to add tests for filesystem APIs, but have you tried that yet? If not, it would be good to add some tests here
I didn't try it yet, but I can certainly take a look. I don't normally code in |
@lewandom thanks, that would be awesome 😄 |
@mike-engel test added, please review. |
tests/main_test.rs
Outdated
@@ -1,14 +1,18 @@ | |||
extern crate tempdir; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a reason this is still using the old edition imports?
extern crate tempdir; | |
use tempdir; |
- moved tempdir to dev dependencies - removed old style import - refactored exit code logic into main - covered print_decoded_token in tests
@mike-engel round 4:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one minor comment, otherwise this looks good to me. The translators shouldn't have been responsible for exiting anyway, so this is better in the long run
src/translators/encode.rs
Outdated
if atty::is(Stream::Stdout) { | ||
println!("{}", jwt); | ||
} else { | ||
print!("{}", jwt); | ||
} | ||
}; | ||
exit(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this exit
be removed now as well?
Done :) |
Very sorry for the delay, but this is in 6.0.0 now |
Summary
Fixes #217.
Preflight checklist