validateNonInteractiveRequirements enforces flag requirements that apply only when prompts are disabled.
(inputs SetupInputs, canPromptFlag bool)
| 996 | |
| 997 | // validateNonInteractiveRequirements enforces flag requirements that apply only when prompts are disabled. |
| 998 | func validateNonInteractiveRequirements(inputs SetupInputs, canPromptFlag bool) error { |
| 999 | if canPromptFlag { |
| 1000 | return nil |
| 1001 | } |
| 1002 | if inputs.App && inputs.Type != "" && inputs.Type != "m2m" && inputs.Framework == "" { |
| 1003 | return fmt.Errorf( |
| 1004 | "--framework is required in non-interactive mode when --type is %s: "+ |
| 1005 | "use --framework and optionally --build-tool flags "+ |
| 1006 | "(e.g. --framework react --build-tool vite)", |
| 1007 | inputs.Type, |
| 1008 | ) |
| 1009 | } |
| 1010 | return nil |
| 1011 | } |
| 1012 | |
| 1013 | // printClientDetails prints post-creation guidance for the new Auth0 application. |
| 1014 | // The config-file outcome is reported by WriteQuickstartConfig itself (success |
no test coverage detected