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

Allow setting variables from args #15

Open
johanhelsing opened this issue Jul 6, 2022 · 2 comments
Open

Allow setting variables from args #15

johanhelsing opened this issue Jul 6, 2022 · 2 comments

Comments

@johanhelsing
Copy link

The --start-node option is pretty useful for testing parts of a conversation. It would be even more useful if it was also possible to set variables.

I.e. something like

ysc run main.yarn --start-node some_deep_node --set-variable met_sally=true --set-variable money=123
@McJones
Copy link
Contributor

McJones commented Jul 15, 2022

This is a cool idea, I am just trying to work out the best way to facilitate this.
Is it better to inject variables live like this or maybe some sort of config file? Or does that lose the "oh wait actually met_sally should be false" feeling?

I suppose at least initially the easiest way to get this would be to create a new node with your variables set and enter that way. Does feel like a bit of an extra step though if you have to edit the yarn.

@johanhelsing
Copy link
Author

Yeah, i currently have a "debug start menu" node, that just lets me enable stuff, then loops back to itself, then starts what i really intended to test.

It's a bit tedious, but kinda works. Args or perhaps special commands while running would be optimal for my use case.

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