func (o *svcStopTaskOpts) AskInput() error {
	if err := o.askAppName(); err != nil {
		return err
	}
	if err := o.askSvcEnvName(); err != nil {
		return err
	}

	// When "--all" is set all the tasks inside the service, will be stopped
	if o.all {
		stopPrompt := fmt.Sprintf(fmtSvcStopTasksConfirmPrompt, o.name, o.appName)
		stopConfirmed, err := o.prompt.Confirm(stopPrompt, svcStopTasksConfirmHelp)

		if err != nil {
			return fmt.Errorf("svc stop task confirmation prompt: %w", err)
		}
		if !stopConfirmed {
			return errStopTasksCancelled
		}
	}
	return nil
}
// AskInput prompts the user for any required flags.
AskInput prompts the user for any required flags.
// AskInput prompts the user for any required flags .
func (o *svcStopTaskOpts) AskInput() error {
	if err := o.askAppName(); err != nil {
		return err
	}
	if err := o.askSvcEnvName(); err != nil {
		return err
	}
	if o.all {
		stopPrompt := fmt.Sprintf(fmtSvcStopTasksConfirmPrompt, o.name, o.appName)
		stopConfirmed, err := o.prompt.Confirm(stopPrompt, svcStopTasksConfirmHelp)
		if err != nil {
			return fmt.Errorf("svc stop task confirmation prompt: %w", err)
		}
		if !stopConfirmed {
			return errStopTasksCancelled
		}
	}
	return nil
}
func ( o * svcStopTaskOpts ) AskInput ( ) error { if err := o . askAppName ( ) ; err != nil { return err } if err := o . askSvcEnvName ( ) ; err != nil { return err } if o . all { stopPrompt := fmt . Sprintf ( fmtSvcStopTasksConfirmPrompt , o . name , o . appName ) stopConfirmed , err := o . prompt . Confirm ( stopPrompt , svcStopTasksConfirmHelp ) if err != nil { return fmt . Errorf ( " " , err ) } if ! stopConfirmed { return errStopTasksCancelled } } return nil }
AskInput prompts the user for any required flags.
AskInput prompts the user for any required flags .
// When "--all" is set all the tasks inside the service, will be stopped