-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vite kill shell script is not launched when running app from terminal #75
Comments
Hi, unfortunately I don't have a Mac to reproduce the bug you describe. The error doesn't seem to appear on Windows or Linux as i can see. |
I haven't had time to troubleshoot it, but am seeing the same behavior. Note that if I kill the process that the script is waiting on, it kills the child process and cleans itself up. This leads me to believe that when the dotnet process is stopped, it's automatically killing child processes, including the cleanup process (before it gets a chance to delete itself). If the native behavior of dotnet on MacOS is to kill the child processes automatically, perhaps the script isn't needed at all? If I get time I can do a custom build and set some more debugging / do more testing. |
I was investigating if the Vite process persists when killing the dotnet process and it appears that is does not. The only thing that is weird to me is that the script is executed when running the app through vscode debugger (even when killing the process externally). Unfortunately, I'm not quite sure why |
While this gets investigated, would it be possible to make sure the shell script is created in a hidden subdirectory? Like Unfortunately the current behaviour is polluting the root directory with a new randomly-named filed every time the dev server is started. |
@matteocontrini I support your idea, in the meantime you can ignore the files with |
Workaround:
|
Expected behaviour: When I run MVC app with
dotnet run
ordotnet watch
withapp.UseViteDevMiddleware();
a new shell script is created to kill vite after the app shuts down. The script self deletes after closing the app.Current behaviour: When I use
app.UseViteDevMiddleware();
in my app, a new shell script with guid name is added to project root. Unfortunately, the script is not launched and persists after shutting down the app. This is a problem, because this file can't be git ignored (random name and root directory) so I have to manually delete it after each app shutdown. The problem does not exist if the app is launched through vscode debugger.System: MacOs
Dotnet version: 8.0.100
I can provide futher information and help if needed.
The text was updated successfully, but these errors were encountered: