microsoft / microsoft/winget-cli

Winget should show installation errors

Open
#3,509 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Feature
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

Brief description of your issue

If a package installation fails I will only get generic error and location of actual log file.
This is not very user friendly.

Steps to reproduce
  1. start bash
  2. winget upgrade -e --id Git.Git
Found Git [Git.Git] Version 2.41.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.
Successfully verified installer hash
Starting package install...
The installer will request to run as administrator, expect a prompt.
Installer failed with exit code: 1
Installer log is available at: > C:\Users\mwisn\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir\WinGet-Git.Git.2.41.0.3-2023-08-07-15-03-17.689.log
  1. tail -15 'C:\Users\mwisn\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir\WinGet-Git.Git.2.41.0.3-2023-08-07-15-03-17.689.log'
2023-08-07 15:03:22.304   Dest DLL name: crypt32.dll
2023-08-07 15:03:22.304   Importing the DLL function.
2023-08-07 15:03:22.307   Successfully imported the DLL function. Delay loaded? No
2023-08-07 15:03:23.807   Defaulting to Cancel for suppressed message box (Retry/Cancel):
                          The following process(es) use Git for Windows:

                          bash.exe (PID 11232)
                          bash.exe (PID 9180)

                          Please terminate those processes and retry.
                          Alternatively, cancel to abandon setup altogether.
2023-08-07 15:03:23.807   Failed to proceed to next wizard page; aborting.
2023-08-07 15:03:23.807   Got EAbort exception.
2023-08-07 15:03:23.807   Deinitializing Setup.
2023-08-07 15:03:23.814   Log closed.
Expected behavior

WinGet should print last few entries from the log.
WinGet should also support a more robust way of finding exact error from logs.

Actual behavior

User has to hunt down the error in log files.

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

Windows: Windows.Desktop v10.0.22621.1992
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.20.1881.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with winget upgrade -e --id Git.Git and inspect how installation failures currently report the installer exit code and diagnostic log path. Done should include useful recent log entries and a more reliable indication of the underlying error instead of requiring users to search the log manually.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli, operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.