microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
23.09k stars 1.44k forks source link

winget install --silent option only suppresses UI and is not completely silent #3891

Closed shalinikhare27 closed 11 months ago

shalinikhare27 commented 11 months ago

Brief description of your issue

--silent option is meant to install packages silently so that users running this in an automated fashion will not need to see the details of installation unless specified.

Steps to reproduce

Run winget install --id Microsoft.Git --disable-interactivity --silent --accept-source-agreements --accept-package-agreements

The logs indicate it did run /VERYSILENT but yet dumps a lot in the console. 2023-11-14 19:23:33.315 Setup command line: /SL5="$290C98,64264836,867328,C:\Users\shakhare\AppData\Local\Temp\WinGet\Microsoft.Git.2.42.0.0.3\Git-2.42.0.vfs.0.3-64-bit.exe" /VERYSILENT /NORESTART /LOG="C:\Users\shakhare\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir\WinGet-Microsoft.Git.2.42.0.0.3-2023-11-14-19-23-30.944.log" /SUPPRESSMSGBOXES /enable-component windowsterminal

Expected behavior

Should not print to stdout if running --silent which is essentially /VERYSILENT. Instead print the outputs to a log file.

Actual behavior

winget install --id Microsoft.Git --disable-interactivity --silent --accept-source-agreements --accept-package-agreements Found Microsoft Git [Microsoft.Git] Version 2.42.0.0.3 This application is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Downloading https://github.com/microsoft/git/releases/download/v2.42.0.vfs.0.3/Git-2.42.0.vfs.0.3-64-bit.exe ██████████████████████████████ 62.4 MB / 62.4 MB Successfully verified installer hash Starting package install... Successfully installed

Environment

Windows Package Manager v1.6.3133
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22631.2428
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.21.3133.0

Running on Windows 11.
Trenly commented 11 months ago
stephengillie commented 11 months ago
microsoft-github-policy-service[bot] commented 11 months ago

Hello @shalinikhare27,

We've identified this as a duplicate of another issue or PR that already exists. This specific instance is being closed in favor of the linked issue. Please add your 👍 to the other issue to raise its priority. Thanks for your contribution!

Template: msftbot/duplicate/closed

shalinikhare27 commented 11 months ago

@stephengillie @Trenly - This issue was closed due to duplicates that exist. I do not see any suggestion or next steps in the duplicate issues.

Trenly commented 11 months ago

Will this be tracked as a feature request so that --silent is completely silent and writes any output to a log file?

That's exactly what the earlier issue was suggesting. Between the title of the earlier request and the body, the feature request is exactly as you described in this issue.

when the --silent argument is used, winget should redirect stdout for the installer to a log file

Is there a timeline when this issue will be addressed or a bug I can track?

The issue you can track is the one which was linked - #1927. When a timeline for resolution / implementation is determined, that issue will be put into a release milestone. @denelon goes through and updates the release milestones as the roadmap changes, so he would be the best to speak to timelines

shalinikhare27 commented 11 months ago

@denelon - Is there an estimation on the timeline/implementation of this?

shalinikhare27 commented 8 months ago

@denelon Is there a timeline to get this fixed?