Skip to content

Commit

Permalink
[fix]更新后重启拉起应用时,参数携带正确的命令行
Browse files Browse the repository at this point in the history
  • Loading branch information
nnhy committed Jul 10, 2024
1 parent e8d2dfb commit 9aa1cc1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion NewLife.Remoting/Clients/ClientBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,11 @@ protected virtual void Restart(Upgrade upgrade)
if (name.IsNullOrEmpty()) return;

// 重新拉起进程
var rs = upgrade.Run(name, $"-upgrade {Environment.CommandLine}");
var args = Environment.GetCommandLineArgs();
if (args == null || args.Length == 0) args = new String[1];
args[0] = "-upgrade";

var rs = upgrade.Run(name, args.Join(" "));

if (rs)
{
Expand Down

0 comments on commit 9aa1cc1

Please sign in to comment.