From 8736f5d00039505267a4780e425f3f3a0a1e3170 Mon Sep 17 00:00:00 2001 From: Caleb Hulbert Date: Fri, 15 Jul 2022 09:38:21 -0400 Subject: [PATCH 1/2] fix: don't include paths starting with Windows drive letters as endpoints --- jgo/jgo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jgo/jgo.py b/jgo/jgo.py index f9559cc..24131fe 100644 --- a/jgo/jgo.py +++ b/jgo/jgo.py @@ -265,7 +265,7 @@ def run_and_combine_outputs(command, *args): def find_endpoint(argv, shortcuts={}): # endpoint is first positional argument - pattern = re.compile(".*https?://.*") + pattern = re.compile("(.*https?://.*|\S:\\.*)") indices = [] for index, arg in enumerate(argv): if arg in shortcuts or (Endpoint.is_endpoint(arg) and not pattern.match(arg)): From f56e9218c688e5d8433fa5f863f851f56cfbaa5e Mon Sep 17 00:00:00 2001 From: cmhulbert Date: Sun, 17 Jul 2022 13:06:30 -0400 Subject: [PATCH 2/2] fix: match only alpha characters --- jgo/jgo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jgo/jgo.py b/jgo/jgo.py index 24131fe..af95f5c 100644 --- a/jgo/jgo.py +++ b/jgo/jgo.py @@ -265,7 +265,7 @@ def run_and_combine_outputs(command, *args): def find_endpoint(argv, shortcuts={}): # endpoint is first positional argument - pattern = re.compile("(.*https?://.*|\S:\\.*)") + pattern = re.compile("(.*https?://.*|[a-zA-Z]:\\.*)") indices = [] for index, arg in enumerate(argv): if arg in shortcuts or (Endpoint.is_endpoint(arg) and not pattern.match(arg)):