Skip to content

Custom stdin/stdout ? #123

Answered by esatterwhite
KaKi87 asked this question in Q&A
Jan 12, 2023 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

It depends on what you want to do I suppose. Admittedly, it was not something that I built for in the early days.

Right now, if you want to sent output to something other than stdout you would have to handle this in a command. If your command returns something other than a string, seeli will not try to write it to stdout. The the entirety of that logic is here

node-seeli/lib/seeli.js

Lines 89 to 100 in a9d7caf

return this.get('help')
.run(cmd)
.then(onComplete.bind(this))
.catch(onError.bind(this))
}
if (this.has(cmd)) {
return this.get(cmd)
.run(parsed.argv.remain.length ? parsed.argv.remain[0] : null)
.then(onComplete.bind(this))

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@esatterwhite
Comment options

@KaKi87
Comment options

Answer selected by KaKi87
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants