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.net8.0
parent
737f2bec84
commit
bc30cc911a
|
@ -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…
Reference in New Issue