9
24
Fork
You've already forked keyoxide-cli
3

Add support for local file input and stdin #8

Merged
yarmo merged 2 commits from caesar/keyoxide-cli:file-input into main 2022年03月25日 17:36:28 +01:00
Contributor
Copy link

Here's my version, as coded last night while half asleep... I can see a couple of things to improve but thought I'd send it as-is so you can decide which approach you prefer.

As you can see, my version supports both file input and stdin.

Closes #5.

Here's my version, as coded last night while half asleep... I can see a couple of things to improve but thought I'd send it as-is so you can decide which approach you prefer. As you can see, my version supports both file input and stdin. Closes #5.
Author
Contributor
Copy link

I guess tests should also be added, but for that we'll need to add a test key into the repo to use in the tests.

I guess tests should also be added, but for that we'll need to add a test key into the repo to use in the tests.
Owner
Copy link

Whaaaat, you can readFileSync(stdin)? Yeah, this approach seems much better than mine. Will study a bit more and then merge!

Whaaaat, you can `readFileSync(stdin)`? Yeah, this approach seems much better than mine. Will study a bit more and then merge!
Author
Contributor
Copy link

Whaaaat, you can readFileSync(stdin)? Yeah, this approach seems much better than mine. Will study a bit more and then merge!

Indeed, but there is a limit (I think platform dependent) on how big the input can be before you have to start using stream methods to read it.
It worked for every key I tested it on, but it's something to be aware of if we get any bug reports about failing to read properly from stdin with very large keys.

> Whaaaat, you can `readFileSync(stdin)`? Yeah, this approach seems much better than mine. Will study a bit more and then merge! Indeed, but there is a limit (I think platform dependent) on how big the input can be before you have to start using stream methods to read it. It worked for every key I tested it on, but it's something to be aware of if we get any bug reports about failing to read properly from `stdin` with very large keys.
Sign in to join this conversation.
No reviewers
Labels
Clear labels
bug
Something is not working
duplicate
This issue or pull request already exists
enhancement
New feature
help wanted
Need some help
invalid
Something is wrong
question
More information is needed
wontfix
This won't be fixed
Contribution welcome
Get started contributing here
Good first issue
Good if you are new to the project or to open source contributions
Impact
External
Affects the people using the project
Impact
Internal
Affects on the people working on the project
Priority
Critical
Work on right now
Priority
High
Work on at earliest convenience
Priority
Low
Work on in spare time
Priority
Medium
Work on regularly
Review
Duplicate
Already exists
Review
Off Topic
Does not fall within the scope of the repo/project
Status
Backlog
Is not being worked on yet
Status
Blocked
Is waiting on something or someone
Status
Completed
Is done
Status
In Progress
Is being worked on
Status
Investigating
Is waiting on research or questions
Status
Needs Decision
Is waiting on a decision by the devs/contributors
Status
Needs Info
Is waiting on additional information before it can be solved
Status
Needs Triage
Is new issue that needs reviewing
Status
Testing
Is being checked and verified
Status
Waiting For Review
Is waiting on reviewers to approve
Status
Won't Fix
Won't be fixed
Type
Bug
Related to something not working as intended
Type
CI
Related to continuous integration
Type
Documentation
Related to documentation
Type
Enhancement
Related to a new feature or an improved one
Type
New Claim
Related to a new identity claim/proof
Type
Security
Related to security
Type
Tests
Related to code tests
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
keyoxide/keyoxide-cli!8
Reference in a new issue
keyoxide/keyoxide-cli
No description provided.
Delete branch "caesar/keyoxide-cli:file-input"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?