dotnet-watch run
fails to reload on Debian machines that do not have the procps
package installed
#27950
Labels
area-commandlinetools
Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI
bug
This issue describes a behavior which is not expected - a bug.
feature-dotnetwatch
This issue is related to the dotnet-watch command-line tool (now external)
Milestone
Describe the bug
dotnet-watch
has some undocumented native dependencies. Specifically it depends on thepgrep
command which is not installed on a clean Debian machine.dotnet-watch run
silently fails to reload when the dependency is not present.To Reproduce
Copied from dotnet/dotnet-docker#2396
Requirements: Linux Docker environment and the .NET 5 CLI
dotnet watch run
and the code mounted in a containerYou'll notice that when opening, altering and saving the
./Startup.cs
file, the service isn't reloaded.Further technical details
mcr.microsoft.com/dotnet/sdk:5.0
image in this scenario is based on Debian. Installing theprocps
package resolves the issue.https://github.com/dotnet/aspnetcore/blob/master/src/Tools/dotnet-watch/src/Internal/ProcessRunner.cs#L164
https://github.com/dotnet/aspnetcore/blob/master/src/Shared/Process/ProcessExtensions.cs#L20
KillTree
implementation could be replaced withSystem.Diagnostrics.Process.Kill(bool entireProcessTree)
. This would be desirable as it would remove this native dependency.procps
package was removed in 5.0 as part of an effort to reduce the image size in order to provide a better UX. The dependencydotnet-watch
has was unknown to all parties involved.The text was updated successfully, but these errors were encountered: