Skip to content

Package succeeds but software Install silently fails when Install-ChocolateyInstallPackage has the wrong arguments #629

Closed

Description

@ferventcoder

If a package tries to install something but doesn't pass the right arguments, do not silently state it is successful

https://gist.github.com/fredrikaverpil/b8b1ce5fd0bacca0a644#file-vcpython27_no_uninstall_possible-log-L84

Activity

  1. added
    BugIssues where something has happened which was not expected or intended.
    0 - BacklogIssue is accepted, but is not ready to be worked on or not in current sprint.
    Priority - HighRepresent high priority tickets - things that must be addressed soon.
    on Feb 11, 2016
  2. self-assigned this
    on Feb 11, 2016
  3. added this to the 0.9.10 milestone on Feb 11, 2016
  4. changed the title [-]If a package tries to install something but doesn't pass the right arguments, do not silently state it is successful[/-] [+]Package succeeds but software Install silently fails when Install-ChocolateyInstallPackage has the wrong arguments[/+] on Feb 11, 2016
  5. ferventcoder commented on Feb 11, 2016

    @ferventcoder
    MemberAuthor

    Found it, fileType is the switch. Since it is empty, it should fail.

    if ($fileType -like 'msi') {
    $msiArgs = "/i `"$file`""
    if ($overrideArguments) {
    $msiArgs = "$msiArgs $additionalInstallArgs";
    write-host "Overriding package arguments with `'$additionalInstallArgs`'";
    } else {
    $msiArgs = "$msiArgs $silentArgs $additionalInstallArgs";
    }
    Start-ChocolateyProcessAsAdmin "$msiArgs" 'msiexec' -validExitCodes $validExitCodes
    #Start-Process -FilePath msiexec -ArgumentList $msiArgs -Wait
    }
    if ($fileType -like 'exe') {
    if ($overrideArguments) {
    Start-ChocolateyProcessAsAdmin "$additionalInstallArgs" $file -validExitCodes $validExitCodes
    write-host "Overriding package arguments with `'$additionalInstallArgs`'";
    } else {
    Start-ChocolateyProcessAsAdmin "$silentArgs $additionalInstallArgs" $file -validExitCodes $validExitCodes
    }
    }
    if($fileType -like 'msu') {
    if ($overrideArguments) {
    $msuArgs = "$file $additionalInstallArgs"
    } else {
    $msuArgs = "$file $silentArgs $additionalInstallArgs"
    }
    Start-ChocolateyProcessAsAdmin "$msuArgs" 'wusa.exe' -validExitCodes $validExitCodes
    }

  6. added
    4 - DoneCode has been added to the repository, and has been reviewed by a team member.
    and removed
    0 - BacklogIssue is accepted, but is not ready to be worked on or not in current sprint.
    on Feb 12, 2016
  7. added 2 commits that reference this issue on Feb 12, 2016
  8. added
    5 - ReleasedThe issue has been resolved, and released to the public for consumption.
    and removed
    4 - DoneCode has been added to the repository, and has been reviewed by a team member.
    on Sep 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

5 - ReleasedThe issue has been resolved, and released to the public for consumption.BugIssues where something has happened which was not expected or intended.Priority - HighRepresent high priority tickets - things that must be addressed soon.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions