Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
stefanroelofs opened this issue Jul 21, 2023 · 1 comment · Fixed by #2520
Closed

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

stefanroelofs opened this issue Jul 21, 2023 · 1 comment · Fixed by #2520
Labels
Documentation Update required to documentation enhancement New feature or request keep-fresh

Comments

@stefanroelofs
Copy link

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.

@stefanroelofs stefanroelofs added the enhancement New feature or request label Jul 21, 2023
@stefanroelofs stefanroelofs changed the title [Describe Your Feature] pm install url does not work with a local path Jul 21, 2023
@github-actions
Copy link

github-actions bot commented Sep 5, 2023

This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 5 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Update required to documentation enhancement New feature or request keep-fresh
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants