Skip to content

Turn off installation progress for cChocoPackageInstall to stop it filling the verbose log output #175

@rcarpenter79

Description

@rcarpenter79

Checklist

  • I have verified this is the correct repository for opening this issue.
  • I have verified no other issues exist related to my request.

Is Your Feature Request Related To A Problem? Please describe.

Yes. Verbose output is a mess when logging installation progress.

cChcocoPackageInstall_Verbose_Output

Describe The Solution. Why is it needed?

Set $ProgressPreferences to 'SilentlyContinue' in InstallPackage before running 'choco install'

Example:
I also corrected a typo in $packageInstallOutput.

    $cmd = "choco install $pName $chocoParams"
    Write-Verbose -Message "Install command: '$cmd'"

    $currentProgressPreference = $ProgressPreference
    $ProgressPreference = 'SilentlyContinue'

    $packageInstallOutput = Invoke-Expression -Command $cmd

    $ProgressPreference = $currentProgressPreference

    Write-Verbose -Message "Package output $packageInstallOutput"

Additional Context

No response

Related Issues

No response

Metadata

Metadata

Assignees

Labels

0 - TriagingIssue is accepted, but a milestone has yet to be added for the issue.EnhancementIssues that introduce new functionality to the project, or enhances/updates existing functionality.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions