mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
Merge pull request #77 from flightlevel/monoautoupdater
Autoupdater: Mono fix
This commit is contained in:
@@ -235,18 +235,25 @@ namespace Jackett.Services
|
|||||||
var exe = Path.GetFileName(ExePath()).ToLowerInvariant();
|
var exe = Path.GetFileName(ExePath()).ToLowerInvariant();
|
||||||
var args = string.Join(" ", Environment.GetCommandLineArgs().Skip(1));
|
var args = string.Join(" ", Environment.GetCommandLineArgs().Skip(1));
|
||||||
|
|
||||||
if (!isWindows)
|
var startInfo = new ProcessStartInfo();
|
||||||
|
|
||||||
|
if (isWindows)
|
||||||
|
{
|
||||||
|
startInfo.Arguments = $"--Path \"{installLocation}\" --Type \"{exe}\" --Args \"{args}\"";
|
||||||
|
startInfo.FileName = Path.Combine(updaterExePath);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
// Wrap mono
|
// Wrap mono
|
||||||
args = exe + " " + args;
|
args = exe + " " + args;
|
||||||
exe = "mono";
|
exe = "mono";
|
||||||
|
|
||||||
|
startInfo.Arguments = $"{Path.Combine(updaterExePath)} --Path \"{installLocation}\" --Type \"{exe}\" --Args \"{args}\"";
|
||||||
|
startInfo.FileName = "mono";
|
||||||
|
startInfo.UseShellExecute = false;
|
||||||
|
startInfo.CreateNoWindow = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
var startInfo = new ProcessStartInfo()
|
|
||||||
{
|
|
||||||
Arguments = $"--Path \"{installLocation}\" --Type \"{exe}\" --Args \"{args}\"",
|
|
||||||
FileName = Path.Combine(updaterExePath)
|
|
||||||
};
|
|
||||||
|
|
||||||
var procInfo = Process.Start(startInfo);
|
var procInfo = Process.Start(startInfo);
|
||||||
logger.Info($"Updater started process id: {procInfo.Id}");
|
logger.Info($"Updater started process id: {procInfo.Id}");
|
||||||
|
Reference in New Issue
Block a user