Skip to content

Commit 71d36a6

Browse files
reckless: handle a direct source in the form of a git repo url
1 parent 307baf7 commit 71d36a6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tools/reckless

+6
Original file line numberDiff line numberDiff line change
@@ -1303,6 +1303,12 @@ def location_from_name(plugin_name: str) -> (str, str):
13031303
if this looks like a filepath or URL and return that as well as the
13041304
plugin name."""
13051305
if not Path(plugin_name).exists():
1306+
try:
1307+
parsed = urlparse(path):
1308+
if parsed.scheme in ['http', 'https']:
1309+
return (plugin_name, Path(plugin_name).with_suffix('').name)
1310+
except ValueError:
1311+
pass
13061312
# No path included, return the name only.
13071313
return (None, plugin_name)
13081314

0 commit comments

Comments
 (0)