Find LANCommander PowerShell module manifest using search
Probably pretty hacky. Environment.CurrentDirectory doesn't seem to be reliable in dev vs prod. In dev it correctly matches the LANCommander.PlaynitePlugin.dll's location. In prod it is the main directory of Playnite.
This commit is contained in:
parent
737f2bec84
commit
bc30cc911a
1 changed files with 5 additions and 1 deletions
|
@ -32,7 +32,11 @@ namespace LANCommander.SDK.PowerShell
|
|||
Process.StartInfo.RedirectStandardOutput = false;
|
||||
|
||||
AddArgument("ExecutionPolicy", "Unrestricted");
|
||||
AddModule(Path.Combine(Environment.CurrentDirectory, "LANCommander.PowerShell.psd1"));
|
||||
|
||||
var moduleManifests = Directory.EnumerateFiles(Environment.CurrentDirectory, "LANCommander.PowerShell.psd1", SearchOption.AllDirectories);
|
||||
|
||||
if (moduleManifests.Any())
|
||||
AddModule(moduleManifests.First());
|
||||
|
||||
IgnoreWow64Redirection();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue