diff --git a/gui/packages/ubuntupro/lib/launch_agent.dart b/gui/packages/ubuntupro/lib/launch_agent.dart index aa39197f5..cb2d088db 100644 --- a/gui/packages/ubuntupro/lib/launch_agent.dart +++ b/gui/packages/ubuntupro/lib/launch_agent.dart @@ -15,6 +15,8 @@ import 'core/environment.dart'; Future launchAgent(String agentRelativePath) async { final agentPath = p.join(msixRootDir().path, agentRelativePath); try { + // Attempts to kill a possibly stuck agent. Failure is desirable in this case. + await Process.run('taskkill.exe', ['/f', '/im', p.basename(agentPath)]); await Process.start( agentPath, ['-vv'],