Rename temp scripts to .ps1

PowerShell won't execute scripts that don't end in .ps1
This commit is contained in:
Pat Hartl 2023-10-27 18:54:19 -05:00
parent 5e47d8fa3d
commit 06188d5800

View file

@ -451,6 +451,10 @@ namespace LANCommander.PlaynitePlugin
{
var tempPath = Path.GetTempFileName();
File.Move(tempPath, tempPath + ".ps1");
tempPath = tempPath + ".ps1";
Logger.Trace($"Writing script {script.Name} to {tempPath}");
File.WriteAllText(tempPath, script.Contents);