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

feat(cli)!: Allow specifying WASI environment variables and CLI args #1840

Merged
merged 8 commits into from
Jul 1, 2023

Conversation

alex-snezhko
Copy link
Member

Closes #1822
Closes #1823

Examples:

grain a.gr --env=FOO=bar
grain a.gr --env FOO=bar FOO2=baz -- arg1 arg2
grain a.gr arg1 arg2   # will not pass args to WASI, -- required

cli/bin/exec.js Outdated Show resolved Hide resolved
@alex-snezhko alex-snezhko changed the title feat(cli): Allow specifying WASI environment variables and CLI args feat(cli)!: Allow specifying WASI environment variables and CLI args May 21, 2023
Copy link
Member

@spotandjake spotandjake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty much good, had two small questions about your changes to process.gr.

stdlib/sys/process.gr Outdated Show resolved Hide resolved
Copy link
Member

@marcusroberts marcusroberts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like how this works!

Copy link
Member

@phated phated left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy with the outcome here. I was thinking the escaped double-dash could be done in the tests themselves, but I think the transformation inside runner is fine.

@phated phated added this pull request to the merge queue Jul 1, 2023
Merged via the queue into grain-lang:main with commit fb8fbf2 Jul 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
6 participants