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

Allow install/upgrade multi packages #67

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

WenceyWang
Copy link

@WenceyWang WenceyWang commented Jan 26, 2022

What I have done

I changed the way the $installPackageId and $upgradePackageId was handled and allow multiple package name will be split into multiple arguments instead of one.

This will fix #49 .

The following content is copied from #49

Expected Behavior

Multiple packages are installed.

Current Behavior

Chocolatey can't find "name1 name2" package.

Possible Solution

Support package names separator or update description to not allow multiple packages to be installed.

Steps to Reproduce (for bugs)

- task: ChocolateyCommand@0
  inputs:
    command: 'install'
    installPackageId: 'name1 name2'

Context

Your Environment

  • Module version used: 0.2.0
  • Operating System and PowerShell version: Azure DevOps

@WenceyWang
Copy link
Author

@gep13 @ferventcoder @flcdrg @mkevenaar
Can you team take a look at this pr and update a version at the marketplace? and maybe also process #65?

@pauby
Copy link
Member

pauby commented Mar 31, 2022

@WenceyWang Before we look at this, can you complete the PR template?

@WenceyWang
Copy link
Author

@WenceyWang Before we look at this, can you complete the PR template?

OK, I have edited the message, and please review it, as there are only 2 lines changed.

And I think the template itself is very strange for a PR.

@JPRuskin
Copy link

JPRuskin commented Apr 1, 2022

So, a few things:
First, though this may have been what you expected it to do, this current behaviour (install one package) is valid (if not enforced very well).

i.e. Is this better behaviour if someone passes a Package Version too? What happens if someone wants to pass multiple package versions? Do we need to remove/ignore the package version if multiple packages are passed, or try and install everything to the given version?

Edit: Just noticed that the text on the field does say The id of the package(s) that are to be installed. Fun! Somewhat ignore the above, then. :)

If we do want to go ahead and make this the new behaviour (instead of, for instance, enforcing no spaces in the package ID field), is it worth adding more valid separators, e.g. semicolons / commas?

If we do go ahead, at the very least, we probably also want to update the help text around the field to show an example of this being used and mention any valid separators.

@WenceyWang
Copy link
Author

i.e. Is this better behaviour if someone passes a Package Version too? What happens if someone wants to pass multiple package versions?

It's very interesting as choco itself actually accepts a "--version" while multiple package name is given. So it's choco's problem for these counterintuitive command line arguments.

And as there's no package with their name containing whitespace, I don't think any other separators are really necessary.

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

Successfully merging this pull request may close these issues.

How to install multiple packages
3 participants