Skip to content

Commit

Permalink
Fix plugin update exception while trying to run the program
Browse files Browse the repository at this point in the history
  • Loading branch information
bagusnl committed Nov 3, 2024
1 parent f1b3ba1 commit 11fe45e
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1584,14 +1584,15 @@ protected virtual async Task StartPackageInstallationInner(List<GameInstallPacka
executableName = asset.RunCommand;
}

string executablePath = Path.Combine(_gamePath, executableName);
string executablePath = ConverterTool.NormalizePath(Path.Combine(_gamePath, executableName));
Process commandProcess = new Process
{
StartInfo = new ProcessStartInfo
{
FileName = executablePath,
Arguments = argument,
UseShellExecute = true
UseShellExecute = true,
WorkingDirectory = Path.GetDirectoryName(executablePath)
}
};

Expand All @@ -1602,6 +1603,7 @@ protected virtual async Task StartPackageInstallationInner(List<GameInstallPacka
}
else
{
LogWriteLine($"Starting plugin process {executablePath} with argument {argument}");
await commandProcess.WaitForExitAsync();
}
}
Expand Down

0 comments on commit 11fe45e

Please sign in to comment.