mirror of https://github.com/pypa/pip
Revert "Raise error if --user and --target arguments are used together"
This reverts commit b6d775d98837a5eaf2cba73a719821c89a71fc8f.
This commit is contained in:
parent
8380b2b09a
commit
268a2dd818
|
@ -1 +0,0 @@
|
|||
Raise error if --user and --target are used together in command
|
|
@ -83,17 +83,6 @@ def parse_command(args):
|
|||
# the subcommand name
|
||||
cmd_name = args_else[0]
|
||||
|
||||
validate_command_args(cmd_name, args_else)
|
||||
|
||||
# all the args without the subcommand
|
||||
cmd_args = args[:]
|
||||
cmd_args.remove(cmd_name)
|
||||
|
||||
return cmd_name, cmd_args
|
||||
|
||||
|
||||
def validate_command_args(cmd_name, args_else):
|
||||
# type: (str, List[str]) -> None
|
||||
if cmd_name not in commands_dict:
|
||||
guess = get_similar_commands(cmd_name)
|
||||
|
||||
|
@ -103,6 +92,8 @@ def validate_command_args(cmd_name, args_else):
|
|||
|
||||
raise CommandError(' - '.join(msg))
|
||||
|
||||
if set(['--user', '--target']).issubset(set(args_else)):
|
||||
error_msg = '--user and --target cant not be used together.'
|
||||
raise CommandError(error_msg)
|
||||
# all the args without the subcommand
|
||||
cmd_args = args[:]
|
||||
cmd_args.remove(cmd_name)
|
||||
|
||||
return cmd_name, cmd_args
|
||||
|
|
Loading…
Reference in New Issue