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

Pass multiple values to same parameter #3

Open
akamud opened this issue Dec 19, 2016 · 2 comments
Open

Pass multiple values to same parameter #3

akamud opened this issue Dec 19, 2016 · 2 comments

Comments

@akamud
Copy link

akamud commented Dec 19, 2016

Is there a way to pass multiple values to a single parameter? Like a string array

 psake test -parameters @{testProjects=@("Api,Acceptance")}

I tried a few things but the , gets interpreted as a new parameter

@qetza
Copy link
Member

qetza commented Dec 20, 2016

Hi @akamud, currently the task is receiving parameters and properties as string and it just splits the values based on newline or comma and then passes the values as string to psake, there is no eval done on the strings. So even if there wasn't the comma issue your script would have received a string with the value "@("Api,Acceptance")" and not an array.

What you can do is pass as a parameter a string with your different values separated by a semi colon (eg: testProjects=Api;Acceptance) and then in your script you split this string to get the individual values.

Changing the split character and doing an eval on the parameter values would be a breaking change, I'll consider this for the next major release when users will be able to specify in VSTS when they want to upgrade the task they're using.

@akamud
Copy link
Author

akamud commented Dec 20, 2016

I see, since the script I was using was mine, I just changed the split character for now.

Thanks.

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

No branches or pull requests

2 participants