Skip to content

Commit

Permalink
Merge pull request #305 from dotnetcore/any
Browse files Browse the repository at this point in the history
fixed some code
  • Loading branch information
NMSAzulX authored Jun 9, 2024
2 parents 13f1fa5 + 787a3db commit 998eed8
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 998eed8

Please sign in to comment.