Skip to content

pm install url does not work with a local path #2252

@stefanroelofs

Description

@stefanroelofs

Is your feature request related to a problem? Please describe.

I learned that I can install custom plugins with the command: pm install http://www.xyz.com/plugin.zip
The parameter needs to be a WellFormedUriString.
See:

if (Uri.IsWellFormedUriString(search, UriKind.Absolute)
&& search.Split('.').Last() == zip)
return InstallFromWeb(search);

When I try to install a local plugin from my disk this fails.
Try this command pm install file:///c:/plugin.zip
Get this exception:

11:53:48.2918+02:00 - ERROR - PluginsManager.InstallOrUpdate - An error occurred while downloading plugin
EXCEPTION OCCURS: System.NotSupportedException: The 'file' scheme is not supported.
   at async Task<HttpResponseMessage> System.Net.Http.HttpClient.SendAsync(HttpRequestMessage request)+Core(?)
   at async Task Flow.Launcher.Infrastructure.Http.Http.DownloadAsync(string url, string filePath, CancellationToken token) in C:/projects/flow-launcher/Flow.Launcher.Infrastructure/Http/Http.cs:line 90
   at async Task Flow.Launcher.Plugin.PluginsManager.PluginsManager.InstallOrUpdateAsync(UserPlugin plugin) in C:/projects/flow-launcher/Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs:line 137

Thanks!

Describe the solution you'd like

Maybe detect a valid path and just copy the zip file?
Or add another keyword: pm install local c:\plugin.zip?

Also it is not documented that you can install a plugin by url. This would be nice to add to the docs somewhere.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions