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

What is the difference between Install-Package and Save-Package? #540

Open
ZenoArrow opened this issue Sep 23, 2023 · 3 comments
Open

What is the difference between Install-Package and Save-Package? #540

ZenoArrow opened this issue Sep 23, 2023 · 3 comments

Comments

@ZenoArrow
Copy link

Can someone explain what the difference between Install-Package and Save-Package is? I've searched for answers to this, but haven't found the key difference(s). If you install or save a package to the same directory, what extra steps is Install-Package doing?

@ThomasNieto
Copy link

Save downloads a package into a directory and can be used to inspect a package or publish to a different repository.

Install downloads and executes the installer (if one exists) then appears when using Get.

Depending on the provider there may not be a difference at all.

@ZenoArrow
Copy link
Author

Thank you for clarifying @ThomasNieto . Just to check, if I used Save-Package and wanted to inspect the installer before its run, would I use Get-Package for that or is there another cmdlet that would allow me to see an installer (if it exists) before running it? Alternatively, is there a naming convention for the installer that would allow me to find it in the package?

@ThomasNieto
Copy link

ThomasNieto commented Sep 23, 2023

There is no naming convention as each provider does it differently and packages can as well.

You'd just use save to download it and then go to the path you specified. Get would not see the saved package unless it supported that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants