From 7aa20e6a3cbb285f8ce6ae4929c321f30c880388 Mon Sep 17 00:00:00 2001 From: fat-snail Date: Fri, 6 Sep 2024 18:49:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E4=BA=86=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E6=9C=8D=E5=8A=A1=E9=9C=80=E8=A6=81=E5=8A=A0=E6=9B=B4?= =?UTF-8?q?=E5=A4=9A=E5=90=AF=E5=8A=A8=E5=8F=82=E6=95=B0=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E8=8E=B7=E5=8F=96=E4=B8=8D=E4=BA=86=E4=B8=BB?= =?UTF-8?q?=E7=A8=8B=E5=BA=8Fdll=E8=B7=AF=E5=BE=84=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NewLife.Agent/CommandHandler/Install.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/NewLife.Agent/CommandHandler/Install.cs b/NewLife.Agent/CommandHandler/Install.cs index f943be2..d2df02d 100644 --- a/NewLife.Agent/CommandHandler/Install.cs +++ b/NewLife.Agent/CommandHandler/Install.cs @@ -33,6 +33,11 @@ public override void Process(String[] args) if (exe.Contains(' ')) exe = $"\"{exe}\""; var dll = args[0].GetFullPath(); + if (!dll.Contains(".dll"))//没有获得到主程的dll + { + dll = Environment.CommandLine?.Split(' ')[0];//Assembly.GetExecutingAssembly().Location; + } + if (dll.Contains(' ')) dll = $"\"{dll}\""; if (fileName.EqualIgnoreCase("dotnet", "dotnet.exe", "java"))