Skip to content

Commit

Permalink
fixed some code
Browse files Browse the repository at this point in the history
  • Loading branch information
NMSAzulX committed Jun 9, 2024
1 parent a6e29e7 commit 787a3db
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Description>动态重载开发代码.</Description>
<Description>动态重载控制台代码结果.</Description>
<PackageId>DotNetCore.Natasha.CSharp.Extension.HotReload</PackageId>
<PackageReleaseNotes>升级到最新版.</PackageReleaseNotes>
<PackageTags>Natasha;Compiler;Extension;Codecov;HotReload;</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ private static Task HotExecute()
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
Console.WriteLine($"Error during hot execution: {ex}");
}
return Task.CompletedTask;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,20 @@ public ValueTask<bool> Run()
Process[] processes = Process.GetProcessesByName(Path.GetFileNameWithoutExtension(_outputNewExeFile));
if (processes.Length > 0)
{
return new ValueTask<bool>(true);
foreach (var item in processes)
{
try
{
if (item.HasExited == false)
{
return new ValueTask<bool>(true);
}
}
catch
{
}

}
}
}
catch (Exception e)
Expand Down

0 comments on commit 787a3db

Please sign in to comment.