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

CLI-supplied environment variables can't contain a comma #1006

Closed
na-- opened this issue Apr 22, 2019 · 0 comments · Fixed by #1077
Closed

CLI-supplied environment variables can't contain a comma #1006

na-- opened this issue Apr 22, 2019 · 0 comments · Fixed by #1077
Labels

Comments

@na--
Copy link
Member

na-- commented Apr 22, 2019

Running the following script:

export default function () {
    console.log(JSON.stringify(__ENV));
}

with k6 run --include-system-env-vars=false --env key="val1,val2" script.js will result in {"key":"val1","val2":""} being printed...

It seems like the pflag.StringSliceP() function is trying to be helpful and split the values when there's a comma and we should use the StringArrayP(), which doesn't do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant