From 51a1bbe6b8ac76b4095db28cf7bcbc2b68cdf0ff Mon Sep 17 00:00:00 2001 From: mika kuns Date: Fri, 17 Apr 2026 14:26:34 +0200 Subject: [PATCH] fix(installer): move service start out of RegisterServiceStep --- src/ClaudeDo.Installer/App.xaml.cs | 4 +++- src/ClaudeDo.Installer/Steps/RegisterServiceStep.cs | 9 --------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/ClaudeDo.Installer/App.xaml.cs b/src/ClaudeDo.Installer/App.xaml.cs index d1502a6..4f5511c 100644 --- a/src/ClaudeDo.Installer/App.xaml.cs +++ b/src/ClaudeDo.Installer/App.xaml.cs @@ -110,14 +110,16 @@ public partial class App : Application sc.AddSingleton(); sc.AddSingleton(); sc.AddSingleton(); + sc.AddSingleton(sp => sp.GetRequiredService()); sc.AddSingleton(); sc.AddSingleton(); sc.AddSingleton(); sc.AddSingleton(sp => sp.GetRequiredService()); - // Stop/Start — NOT registered as IInstallStep (not part of default FreshInstall pipeline). + // Stop — NOT registered as IInstallStep (not part of default FreshInstall pipeline). // Pulled by Update flow + Repair/Uninstall. sc.AddSingleton(); + // StartServiceStep is also registered as IInstallStep above (fresh-install pipeline). sc.AddSingleton(); // Runners diff --git a/src/ClaudeDo.Installer/Steps/RegisterServiceStep.cs b/src/ClaudeDo.Installer/Steps/RegisterServiceStep.cs index a57ff87..70baa28 100644 --- a/src/ClaudeDo.Installer/Steps/RegisterServiceStep.cs +++ b/src/ClaudeDo.Installer/Steps/RegisterServiceStep.cs @@ -67,15 +67,6 @@ public sealed class RegisterServiceStep : IInstallStep if (failExit != 0) progress.Report($"Warning: failed to set restart policy (exit {failExit})"); - // Start service if auto-start - if (ctx.AutoStart) - { - progress.Report("Starting service..."); - var (startExit, _) = await RunSc($"start {ServiceName}", ctx, progress, ct); - if (startExit != 0) - progress.Report("Warning: service created but failed to start. You may need to start it manually."); - } - return StepResult.Ok(); }