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

Add additional arg for stdin to embedded commands #619

Closed
mpeck opened this issue May 4, 2016 · 1 comment
Closed

Add additional arg for stdin to embedded commands #619

mpeck opened this issue May 4, 2016 · 1 comment
Milestone

Comments

@mpeck
Copy link
Contributor

mpeck commented May 4, 2016

Currently embedded commands may receive the output from previous commands via req.cog_env. This isn't particularly obvious and we also need to use cog_env for other, more envy things (see #618). To make it more clear embedded commands handle_message function will receive an additional argument that contains the decoded json from the previous command.

def handle_message(req, args, stdin) do
...
end

parent #399

@mpeck mpeck added this to the Cog 0.6.0 milestone May 4, 2016
@vanstee
Copy link
Member

vanstee commented May 5, 2016

I was actually wrong about this the command request (passed into handle_message as req) contains all the env vars that we pass to relay, so I think reading previous output from req.cog_env and env vars from req is fine for now.

@vanstee vanstee closed this as completed May 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants