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

using --allow-downgrade with Params seems not to work. #12

Closed
alkampfergit opened this issue Oct 19, 2015 · 3 comments
Closed

using --allow-downgrade with Params seems not to work. #12

alkampfergit opened this issue Oct 19, 2015 · 3 comments

Comments

@alkampfergit
Copy link

With this configuration

cChocoPackageInstaller libreOffice
{
Name = "libreoffice"
Version = "4.4.3"
Params = "--allow-downgrade"
DependsOn = "[cChocoInstaller]installChoco"
}

I still got the error as --allow-downgrade was not specified.

Am I doing something wrong?

Thanks.

VERBOSE: [ADLDSDOMAIN]: [[cChocoPackageInstaller]libreOffice] Package output Installing the
following packages: libreoffice By installing you accept licenses for the packages. A newer version of libreoffice
(v5.0.2) is already installed. Use --allow-downgrade to attempt to install older versions, or use side by side to
allow multiple versions. Chocolatey installed 0/1 package(s). 1 package(s) failed. See the log for details

@ferventcoder
Copy link
Member

Params are the package params passed to choco, that get passed on to the package itself. It appears you need additional arguments passed to choco itself, which is a new field that I don't believe exists here yet.

See https://github.com/PowerShellOrg/cChoco/blob/master/DSCResources/cChocoPackageInstall/cChocoPackageInstall.psm1#L153

Side note: https://github.com/PowerShellOrg/cChoco/blob/master/DSCResources/cChocoPackageInstall/cChocoPackageInstall.psm1#L153 and surrounding code look like they could use some refactoring.

@alkampfergit
Copy link
Author

Thanks for the clarification, I think that should not be a bit problem to fork and modify the package to add such a functionality.

alkampfergit added a commit to alkampfergit/cChoco that referenced this issue Oct 20, 2015
Related to my issue chocolatey#12
I need to be able to pass specific choco parameters to
choco, Ex: --allow-downgrade.

To accomplish this need I added CmdParams to the original
package.
lawrencegripper added a commit that referenced this issue Sep 6, 2016
@javydekoning
Copy link
Contributor

This has been fixed in #53

      cChocoPackageInstaller installSkypeWithChocoParams
      {
        Name                 = 'skype'
        chocoParams          = '--allowdowngrade'
        Ensure               = 'Present'
      }

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