Comments (9)
When using upgrade, it upgrades the package if the version in the source folder is newer than the installed one.
I also noticed that the installation works if I provide the version with --version
. With this switch, I can even install older versions.
I guess I just shouldn't use --force.
Thanks for your help.
from choco.
choco install foo-cc --source 'C:\temp\bad1' -Y --force -d
You mentioned that the package is in the C:\temp\bad
folder. But you specified the source as C:\temp\bad1
?
from choco.
Sorry, that was a typo when writing the issue. In my extensive tests, the correct directory was used. I will edit my issue to remove this confusion.
from choco.
I can't reproduce the issue here (note there are no issues with having '-' in the package name):
Note that my package above is empty and doesn't have any Chocolatey scripts. Can you provide your package?
from choco.
Thanks for your efforts so far. Did you use filename that contains dots (like foo-cc.24.5.24095.5.nupkg
?)
I can't provide my package (secret stuff), but I will try to reproduce it with an empty package this weekend!
from choco.
The dots are the version number. The filename of the package was foo-cc.24.5.24095.5.nupkg
.
from choco.
I tried to reproduce the problem but didn't succeed. When renaming the file, the installation still fails. That's weird. I am convinced it was that way.
However, I looked more into this issue and I found out that my problem is related to the version of the package.
I have two files:
- ClassLibrary1.1.2.0.nupkg
- ClassLibrary1.1.3.0.nupkg
First, I install version 1.2.0 without any problems:
choco install ClassLibrary1 --source "C:\temp\foo" -f -y
Then, I try to install version 1.3.0:
choco install ClassLibrary1 --source "C:\temp\<path-to-1-3>" -f -y
Output:
choco install ClassLibrary1 --source "C:\temp\foo" -f -y
Chocolatey v2.2.2
Installing the following packages:
ClassLibrary1
By installing, you accept licenses for the packages.
ClassLibrary1 v1.2.0 already installed. Forcing reinstall of version '1.2.0'.
Please use upgrade if you meant to upgrade to a new version.
ClassLibrary1 not installed. The package was not found with the source(s) listed.
My expectation was that when using --force
, it will install the package in the folder, even though a different version of it is already installed.
from choco.
What happens when you do what the message suggests and use upgrade
?
--force
installs the same version again in this case. Note that using --force
is not recommended as, as this case demonstrates, it will not do what you think.
from choco.
I can even install older versions.
Note that you need to add --allow-downgrade
to install older versions over a new version.
from choco.
Related Issues (20)
- Pin using reason leads to wrong error message HOT 4
- choco hook package - post-install trigger does not fire when package installation fails HOT 7
- Get-ChocolateyWebFile.ps1 detected as malicious from ESET HOT 21
- Using `Install-ChocolateyPath -PathType Machine` in a non-admin context spawns PowerShell endlessly and never completes
- Deprecate `unpackself` command
- Rework build process to remove the use of `-unpackself`
- Remove `-unpackself` command and adjust build/debugging as appropriate
- Chrome package not installing HOT 1
- Change namespace casing to PascalCase HOT 2
- Improve package dependency lookup when an exact version is defined
- choco uninstalled a number of wrong packages when I want to uninstall ONE package HOT 6
- Autoremove feature or list leaf packages
- Chocolatey CLI v2.2.2 prompts for credentials when trying to install the ROS noetic desktop_full package HOT 2
- How to install choco without admin to local path user ? HOT 2
- dotnet4.5.2 was not found with the source(s) listed HOT 5
- Install-ChocolateyFileAssociation creating unnecessary 3rd parameter in registry command, causing error in app when opening associated filetype HOT 4
- Update GenerateDocs.ps1 to support the Astro Framework
- Install-ChocolateyPath: should -Scope default to 'Machine'
- Accessing icon from protected bin repo HOT 1
- Dependency resolution during install can be slow HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from choco.