microsoft / microsoft/winget-cli

`Install-WinGetPackage -Override` does not take current directory into account unlike `winget install --override`

Open
#4,313 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Brief description of your issue

Install-WinGetPackage -Override does not take current directory into account, while winget install --override does.

Steps to reproduce

Current directory contains a Configuration.xml file used for Office install configuration.

PS> Install-WinGetPackage Microsoft.Office -Override "/configure Configuration.xml"

image

PS> winget install Microsoft.Office --override "/configure Configuration.xml"

image

Expected behavior
Install-WinGetPackage -Override

takes current directory into account like

winget install --override
Actual behavior

Full path needs to be specified in installer arguments when using Install-WinGetPackage -Override.

Environment
Gestionnaire de package Windows v1.7.10661
Copyright (c) Microsoft Corporation. Tous droits réservés.

Windows: Windows.Desktop v10.0.22631.3296
Architecture du système : X64
Package : Microsoft.DesktopAppInstaller v1.22.10661.0

Répertoires Winget
-----------------------------------------------------------------------------------------------------------------------
Journaux                                     %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\Local…
Paramètres utilisateurs                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\Local…
Répertoire des liens portables (utilisateur) %LOCALAPPDATA%\Microsoft\WinGet\Links
Répertoire des liens portables (ordinateur)  C:\Program Files\WinGet\Links
Racine de package portable (utilisateur)     %LOCALAPPDATA%\Microsoft\WinGet\Packages
Racine du package portable                   C:\Program Files\WinGet\Packages
Racine de package portable (x86)             C:\Program Files (x86)\WinGet\Packages
Téléchargements du programme d’installation  %USERPROFILE%\Downloads

Liens
---------------------------------------------------------------------------------------------
Déclaration de confidentialité        https://aka.ms/winget-privacy
Contrat de licence                    https://aka.ms/winget-license
Avis de tiers                         https://aka.ms/winget-3rdPartyNotice
Page d’accueil                        https://aka.ms/winget
Conditions générales du Windows Store https://www.microsoft.com/en-us/storedocs/terms-of-sale

Paramètre administrateur                  État
---------------------------------------------------
LocalManifestFiles                        Désactivé
BypassCertificatePinningForMicrosoftStore Désactivé
InstallerHashOverride                     Désactivé
LocalArchiveMalwareScanOverride           Désactivé

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 at the Install-WinGetPackage entry point and compare its override handling with winget install --override. Reproduce the commands from the issue with a Configuration.xml in the current directory; done means the PowerShell command resolves that relative path like the CLI command.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, powershell
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.