仓库指标
- Star
- (7,844 star)
- PR 合并指标
- (平均合并 5天 2小时) (30 天内合并 16 个 PR)
描述
How would this feature be useful?
When using pipx run someapp, a version of someapp is cached for 14 days. There could be new releases within that timeframe that could be useful to have.
Describe the solution you'd like
I think my ideal solution would be to just automatically check for a newer version and upgrade if it exists. If you're already on the latest version, use the cache.
The next best solution (which would avoid any backwards compatibility issues) would be pipx run --latest someapp, that would work the same way but require an explicit flag.
A third solution, that might work well with the second, is having some sort of config you can set (e.g. ~/.pipxrc) that lets you say you always want the --latest flag.
Describe alternatives you've considered
The only real workaround I've found is to run the app a second time without cache, then a third time with the cache. This also only works if you know the version has changed and want to force it to change. For example:
pipx run someapp --version # v0.1.0
# some new update comes out
pipx run --no-cache someapp --version # v0.1.1
pipx run someapp --version # v0.1.1
Some downsides:
- If the app has a lot of dependencies, running
--no-cacheevery time will be pretty inefficient. - If you don't always run with
--no-cache, you need to know somehow if there's a version update - If you want to update once with
--no-cache, it will delete the cache the first time and download the latest version, then the second time it'll download it again but actually cache it.