Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

winget export with relative paths does not work #1922

Open
digit4lhaze opened this issue Feb 10, 2022 · 7 comments
Open

winget export with relative paths does not work #1922

digit4lhaze opened this issue Feb 10, 2022 · 7 comments
Labels
Command-Export Issue related to WinGet Export Issue-Feature This is a feature request for the Windows Package Manager client.

Comments

@digit4lhaze
Copy link

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
@ghost ghost added the Needs-Triage Issue need to be triaged label Feb 10, 2022
@Trenly
Copy link
Contributor

Trenly commented Feb 10, 2022

winget export ../desktop/Folder/export.json worked for me

@digit4lhaze
Copy link
Author

winget export ../desktop/Folder/export.json

That works for me too thx!
But Im still wondering why "winget export -o ~/desktop/installedpackages.json" does not work...

It should also work with "~" right?

@ItzLevvie
Copy link

It's .. for Windows and ~ for Unix/Linux distributions.

@digit4lhaze
Copy link
Author

It's .. for Windows and ~ for Unix/Linux distributions.

Ok sorry then for the noob question...

I tried "cd ~/desktop" in powershell and it worked... So I thought it should also work for this tool...

@denelon denelon added Issue-Feature This is a feature request for the Windows Package Manager client. and removed Needs-Triage Issue need to be triaged labels Feb 10, 2022
@denelon
Copy link
Contributor

denelon commented Feb 10, 2022

I converted this "bug" into a "Feature". We may be able to make this work. I'm all about not having to "fight" muscle memory. We will have to take a look and consider any implications with how this might create problems elsewhere, but it might help reduce friction.

@ItzLevvie
Copy link

I tried "cd ~/desktop" in powershell and it worked... So I thought it should also work for this tool...

Ah, I thought you were running it in Command Prompt.

@Trenly
Copy link
Contributor

Trenly commented Jun 16, 2023

[Policy] Command-Export

@microsoft-github-policy-service microsoft-github-policy-service bot added the Command-Export Issue related to WinGet Export label Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Command-Export Issue related to WinGet Export Issue-Feature This is a feature request for the Windows Package Manager client.
Projects
None yet
Development

No branches or pull requests

4 participants