Skip to content

Commit

Permalink
bugfix check_args - count of argv off by one
Browse files Browse the repository at this point in the history
  • Loading branch information
robwaz committed Aug 2, 2024
1 parent a804443 commit a97a226
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chio.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def check_arg(args, n, v):
print_hint("simply need to pass in a different argv[0]. Bash has several ways to do it, but one way is to")
print_hint("use a combination of a symbolic link (e.g., the `ln -s` command) and the PATH environment variable.")

assert len(args) >= n-1, "It looks like you did not pass enough arguments to the program."
assert len(args) >= n, "It looks like you did not pass enough arguments to the program."
assert args[n] == v, f"argv[{n}] is not '{v}' (it seems to be '{args[n]}', instead)."

def check_env(k, v):
Expand Down

0 comments on commit a97a226

Please sign in to comment.