diff --git a/updater/internal/action/service_action.go b/updater/internal/action/service_action.go index 8781df5da..b3cd2a606 100644 --- a/updater/internal/action/service_action.go +++ b/updater/internal/action/service_action.go @@ -71,7 +71,7 @@ func NewServiceUpdateAction(logger *zap.Logger, installDir string) *ServiceUpdat return &ServiceUpdateAction{ backupSvc: service.NewService( namedLogger, - "", // latestDir doesn't matter here + installDir, service.WithServiceFile(path.BackupServiceFile(installDir)), ), } diff --git a/updater/internal/service/service_windows.go b/updater/internal/service/service_windows.go index a79f8815a..4bf9a6858 100644 --- a/updater/internal/service/service_windows.go +++ b/updater/internal/service/service_windows.go @@ -56,6 +56,7 @@ func NewService(logger *zap.Logger, installDir string, opts ...Option) Service { newServiceFilePath: filepath.Join(path.ServiceFileDir(installDir), "windows_service.json"), serviceName: defaultServiceName, productName: defaultProductName, + installDir: installDir, logger: logger.Named("windows-service"), }