microsoft / microsoft/winget-cli
Winget export does not check path
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Brief description of your issue
Winget export will proceed with export even if given an invalid path
Steps to reproduce
winget export -o NONEXISTANT:\file
Expected behavior
An error message and non-zero exit code (before checking pacakges)
Actual behavior
Winget proceeds to check all packages (Warning about unavailable packages)
When done, no error is output, but no file is saved.
Environment
Windows Package Manager v1.3.2091
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.19044.2006
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.18.2091.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the winget export command and reproduce the issue using -o NONEXISTANT:\file. Trace how the output path is handled before package checking. Done means an invalid path produces an error and a non-zero exit code before package processing, with a test covering the behavior if the relevant test location is found.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100