Open wdoekes opened 4 weeks ago
Seems related to #1282.
There is this code:
parser = argparse.ArgumentParser(
prog=prog_name(),
formatter_class=LineWrapRawTextHelpFormatter,
description=PIPX_DESCRIPTION,
parents=[shared_parser],
)
It enables/allows --global
etc. before the install
command. But it's a separate parser and values are not available at parser.parse_args()
because they are overwritten by the second usage of shared_parser
.
Easiest workaround is to disallow the shared_parser values. At least then the breakage is obvious:
parser = argparse.ArgumentParser(
prog=prog_name(),
formatter_class=LineWrapRawTextHelpFormatter,
description=PIPX_DESCRIPTION,
#REMOVEME# `parents=[shared_parser],
)
An alternative might be to rename the dest
(from global_is_global
to is_global
) before using it as second shared_parser and then checking a combination of global_is_global
and is_global
. But that feels hackish.
This is a major bug to me. It breaks backwards compatibility.
Describe the bug
Doing
pipx install --global
behaves differently frompipx --global install
. The latter command does not do global but local.How to reproduce
^- not global
^- yes, global
Expected behavior
Both
install --global
and--global install
should install in the same place: /usr/local/bin.Cause?
Likely the code from #1397 has something to do with this.
1.5 works fine:
In 1.5 it complains when doing things "the new way":
So, the only order has been
--global install
and something in 1.6.0 severely broke it.