fix: resolve argocdService initialization issue in notifications CLI (#24664)

Signed-off-by: puretension <rlrlfhtm5@gmail.com>
This commit is contained in:
DOHYEONG LEE
2025-09-22 21:26:52 +09:00
committed by GitHub
parent 52c70b84c8
commit d1f8cddad0
2 changed files with 4 additions and 2 deletions

View File

@@ -30,11 +30,12 @@ func NewNotificationsCommand() *cobra.Command {
)
var argocdService service.Service
toolsCommand := cmd.NewToolsCommand(
"notifications",
"argocd admin notifications",
applications,
settings.GetFactorySettingsForCLI(argocdService, "argocd-notifications-secret", "argocd-notifications-cm", false),
settings.GetFactorySettingsForCLI(func() service.Service { return argocdService }, "argocd-notifications-secret", "argocd-notifications-cm", false),
func(clientConfig clientcmd.ClientConfig) {
k8sCfg, err := clientConfig.ClientConfig()
if err != nil {