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