🐛 Fix argparse again
This commit is contained in:
parent
2f6d543528
commit
53e8590da6
@ -7,9 +7,9 @@ from subprocess import run
|
|||||||
from requests import get
|
from requests import get
|
||||||
|
|
||||||
parser = ArgumentParser()
|
parser = ArgumentParser()
|
||||||
parser.add_argument("path", nargs=1, default=[Path.cwd()])
|
parser.add_argument("path", nargs="?", default=Path.cwd())
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
path = Path(args.path[0])
|
path = Path(args.path)
|
||||||
|
|
||||||
if not path.is_dir():
|
if not path.is_dir():
|
||||||
print("Invalid path")
|
print("Invalid path")
|
||||||
|
Loading…
Reference in New Issue
Block a user