Skip to content

Commit

Permalink
apt: Accept arguments preceeding command
Browse files Browse the repository at this point in the history
Fixes #125
  • Loading branch information
clefebvre committed May 26, 2021
1 parent 150a1c0 commit 8ae91d3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions usr/local/bin/apt
Expand Up @@ -64,6 +64,14 @@ if len(sys.argv) < 2:
argcommand = sys.argv[1]
argoptions = sys.argv[2:]

for command in ["install", "remove", "update", "clean"]:
if argcommand.startswith("-") and command in argoptions:
for i in range(0, len(argoptions)):
if argoptions[i] == command:
argoptions[i] = argcommand
argcommand = command
break

command = ""

show_help = False
Expand Down

1 comment on commit 8ae91d3

@maxchendt
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line 67 should be: add upgrade

for command in ["install", "remove", "update", "clean", "upgrade"]:

Please sign in to comment.