Choco: Check the current choco version number on run or at least package fail

Created on 22 Jun 2017  路  8Comments  路  Source: chocolatey/choco

In the event of a package install fail please can you do a quick version check against the current version and if the version is out of date suggest that the user runs choco update first before contacting the package owner.

Ideally you could run a check after each package install like npm to help the user stay up to date & avoid security issues.

This would also save embarrassing support calls to the package owner for choco newbies like myself. 馃榿

0 - Backlog Enhancement

All 8 comments

Thanks, this is a great idea!

Choco is used in many, many places that don't have access to the internet, so the version of choco they have cached may not be the latest during the query (they will have a version of choco on their internal repo that is older than the most recently released), I'm not sure how we would work with that though. For all other cases, this is 馃憤 and I've seen ChocolateyGUI do this as well.

In the event that the app detects no internet it could just show a simple message instead with the current version number and a suggestion to check with the local administrator to ask them to check for an update.

@zebslc I meant:

  • Folks/organizations download chocolatey.nupkg (some version) and put it on an internal repo.
  • Those choco instances have removed the default community package repository (aka https://chocolatey.org/packages or https://chocolatey.org/api/v2)
  • choco should only check against identified sources for newer versions, so it would only be checking against those internal repositories
  • the community package repository gets a newer version of choco
  • users hooked up to that would get a message
  • systems/users hooked up to the internal repo would not get a message - choco would only know of an upgrade when those internal repos were updated to a newer version of choco.

Let me know if that still doesn't make sense.

Hi - sorry for the delay replying - your comments make total sense - the current version number can be shown then on package fail regardless of where the package connection points to.

However if the installer can still see the default community packages (https://chocolatey.org/packages) it could potentially check for the latest version number as well and warn if older.

Thank you

Folks/organizations download chocolatey.nupkg (some version) and put it on an internal repo.
Those choco instances have removed the default community package repository (aka https://chocolatey.org/packages or https://chocolatey.org/api/v2)

QUESTION: Would these folks/organizations be using Pro / MSP, Architect, or Business (C4B)? If so, maybe those versions don't check the choco version but the community version does? Or maybe the choco version check could be done or not done based upon the repository?

Of course the package nuspec can define the required version of chocolatey as a dependency....

Not all organizations using Chocolatey use the commercial editions. The best way to know is to simply query if the community repo exists and is enabled on a machine.

It would be great if the version check (against the source repo path) could be configurable. Default to community and for those using commercial version they can alter as needed.

Was this page helpful?
0 / 5 - 0 ratings