opam icon indicating copy to clipboard operation
opam copied to clipboard

opam admin should self-upgrade (as other commands do)

Open dra27 opened this issue 3 years ago • 2 comments

opam admin --help shows OPAMNOSELFUPGRADE in ENVIRONMENT VARIABLES but doesn't actually support it, or the --no-self-upgrade.

For consistency, global options should probably be available globally 🙂 It should just be a matter of moving the wrapping in OpamCommands.global_options into OpamArg.global_options.

dra27 avatar Aug 19 '20 10:08 dra27

Having looked at this in more detail, this would entail a bigger change of behaviour. At the moment, all commands except opam admin do self-upgrading (and so have --no-self-upgrade). It obviously makes no sense to add --no-self-upgrade to opam admin without also making it do the self-upgrade. However, that's a less-obvious change, so I'm going to bump this to next.

dra27 avatar Mar 11 '21 16:03 dra27

The change itself is not difficult, though - and it can also be guarded with CLI versioning!

dra27 avatar Mar 11 '21 16:03 dra27