add the pm command to survey cli

use command context to store app service
This commit is contained in:
Robin Olsen
2026-02-25 21:57:30 +01:00
parent 4c0fff0750
commit d83422104b
4 changed files with 43 additions and 13 deletions

View File

@@ -13,15 +13,9 @@ import (
)
func runStartCmd(cmd *cobra.Command, args []string) error {
app := surveyCmd.AppFromContext(cmd.Context())
interfaces := initInterfaces()
svc, cleanup, err := initializeServices(cmd.Context())
if err != nil {
return returnIfUserQuit(err, "failed to initialize services")
}
defer cleanup()
surveyTasks := initTasks(svc)
surveyTasks := initTasks(app)
if cmd.Flags().Changed("interface") {
if _, ok := interfaces[surveyCmd.InterfaceType]; !ok {