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

Get-PackageParameters should handle urls #1459

Closed
ferventcoder opened this issue Nov 27, 2017 · 0 comments
Closed

Get-PackageParameters should handle urls #1459

ferventcoder opened this issue Nov 27, 2017 · 0 comments

Comments

@ferventcoder
Copy link
Member

What You Are Seeing?

Calling Get-PackageParameters with a url splits the URL.
--params"'/url:https://somewhere.com'" results in @(url=https:, somewhere.com=True)

What is Expected?

--params"'/url:https://somewhere.com'" should result in @(url=https://somewhere.com)

How Did You Get This To Happen? (Steps to Reproduce)

  • choco install id --params"'/item:value /url:https://somewhere.com /bob:yes sir'"
@ferventcoder ferventcoder self-assigned this Nov 27, 2017
@ferventcoder ferventcoder added this to the 0.10.9 milestone Nov 27, 2017
ferventcoder added a commit that referenced this issue Jan 23, 2018
Previously, when handling parameters with url values, which have both
`:` and `/`, Get-PackageParameters would split on those parameters.
This made it near impossible to pass through urls without finessing the
values.

Switch to using a regular expression that can handle the complexity of
parameters:

* Split on start of string and `/` or a space and then `/`.
* The splitter for each item name and value is either `:` or `=`.
* A flag should be set true if present (an item without a value).
* An item value can contain spaces colons and equals signs, pretty much
anything except for a space followed by "/".
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