Skip to content

Commit

Permalink
core: fix installation path with spaces (#10489)
Browse files Browse the repository at this point in the history
  • Loading branch information
ngosang committed Dec 12, 2020
1 parent 13baa27 commit d77b7c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Jackett.Updater/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -516,15 +516,15 @@ private void ProcessUpdate(UpdaterConsoleOptions options)
if (isWindows)
{
//User didn't initiate the update from Windows service and wasn't running Jackett via the tray, must have started from the console
startInfo.Arguments = $"/K {startInfo.FileName} {startInfo.Arguments}";
startInfo.Arguments = $"/K \"{startInfo.FileName}\" {startInfo.Arguments}";
startInfo.FileName = "cmd.exe";
startInfo.CreateNoWindow = false;
startInfo.WindowStyle = ProcessWindowStyle.Normal;
}

if (variant == Variants.JackettVariant.Mono)
{
startInfo.Arguments = startInfo.FileName + " " + startInfo.Arguments;
startInfo.Arguments = $"\"{startInfo.FileName}\" {startInfo.Arguments}";
startInfo.FileName = "mono";
}

Expand All @@ -535,7 +535,7 @@ private void ProcessUpdate(UpdaterConsoleOptions options)
startInfo.CreateNoWindow = true;
}

logger.Info("Starting Jackett: " + startInfo.FileName + " " + startInfo.Arguments);
logger.Info($"Starting Jackett: \"{startInfo.FileName }\" {startInfo.Arguments}");
Process.Start(startInfo);
}
}
Expand Down

0 comments on commit d77b7c3

Please sign in to comment.