@@ -1303,6 +1303,12 @@ def location_from_name(plugin_name: str) -> (str, str):
1303
1303
if this looks like a filepath or URL and return that as well as the
1304
1304
plugin name."""
1305
1305
if not Path (plugin_name ).exists ():
1306
+ try :
1307
+ parsed = urlparse (plugin_name )
1308
+ if parsed .scheme in ['http' , 'https' ]:
1309
+ return (plugin_name , Path (plugin_name ).with_suffix ('' ).name )
1310
+ except ValueError :
1311
+ pass
1306
1312
# No path included, return the name only.
1307
1313
return (None , plugin_name )
1308
1314
@@ -1336,6 +1342,7 @@ def install(plugin_name: str) -> Union[str, None]:
1336
1342
commit = None
1337
1343
# Is the install request specifying a path to the plugin?
1338
1344
direct_location , name = location_from_name (name )
1345
+ src = None
1339
1346
if direct_location :
1340
1347
logging .debug (f"install of { name } requested from { direct_location } " )
1341
1348
src = InstInfo (name , direct_location , None )
@@ -1346,7 +1353,6 @@ def install(plugin_name: str) -> Union[str, None]:
1346
1353
if src and src .srctype == Source .LOCAL_REPO :
1347
1354
src .srctype = Source .DIRECTORY
1348
1355
if not direct_location or not src :
1349
- log .debug (f"direct_location { direct_location } , src: { src } " )
1350
1356
log .debug (f"Searching for { name } " )
1351
1357
if search (name ):
1352
1358
global LAST_FOUND
0 commit comments