microsoft / microsoft/winget-cli

winget export with relative paths does not work

Open
#1,922 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Command-Export 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

"winget export -o ~/desktop/installedpackages.json" does not create a file while

"winget export -o C:\Users$InsertUsernameHere\Desktop\installedpackages.json" does work

It would be nice if that would be fixed to make scripts easier

Thanks

Steps to reproduce

winget export -o ~/desktop/installedpackages.json

Expected behavior

Creates export file in relative path sucessfully

Actual behavior

the process runs as normal but creates no export file

Environment
winget --info

Windows.Desktop v10.0.19044.1466
Microsoft.DesktopAppInstaller v1.16.13405.0


winget --version

v1.1.13405

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 winget export -o ~/desktop/installedpackages.json and compare it with the working absolute-path command. Trace the winget export command entry point and its output-path handling; done means the relative path creates the requested export file successfully.

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
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.