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

Reading passed parameters in JS file #55

Closed
gyosida opened this issue Jul 10, 2024 · 2 comments
Closed

Reading passed parameters in JS file #55

gyosida opened this issue Jul 10, 2024 · 2 comments

Comments

@gyosida
Copy link

gyosida commented Jul 10, 2024

The documentation indicates that is possible to pass parameters to JS file using runScript as with runFlow. Provides an example and that’s good.

However, having an example to read the parameters in the JS file would be handy. Had to google and find a random repository to know that I had to directly reference the name of the parameter and not ${myParameter}, or process.env.myParameter.

Passing parameters

- runScript:
     file: script.js
     env:
        myParameter: ‘Parameter’

Reading a parameter in a JS file

const passedInParameter = myParameter;
@Fishbowler
Copy link
Contributor

Fixed by #62

@bartekpacia
Copy link
Member

thanks Dan!

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

3 participants