close
Skip to content

pkgx --update #1267

@felipecrs

Description

@felipecrs

pkgx does not provide a way to update already cached pkgs.

For example:

# prune cache
$ rm -rf ~/.pkgx

# cache an old version
$ pkgx jq@1.6

# reuses the cached version
$ pkgx jq

# reuses the cached version
$ pkgx jq@1

Except that, if you pass @latest, then it will update the cached pkg:

# downloads a newer version, like 1.8
$ pkgx jq@latest

However, not always I want the actual latest version. Sometimes I just want the latest version within a range, like @1.

It would be great if the --update flag from v1 was brought back so that:

# prune cache
$ rm -rf ~/.pkgx

# cache an old version
$ pkgx jq@1.6

# reuses the cached version
$ pkgx jq@1

# finds and use the latest jq@1
$ pkgx --update jq@1

I would use this feature in my dotfiles script that updates everything in my system.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions