{"record":{"id":"49c19cb0db58ac0d","repo":"hasura/graphql-engine","slug":"error-in-getting-input-from-user-w","errorCode":null,"errorMessage":"error in getting input from user: %w","messagePattern":"error in getting input from user: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/commands/actions_use_codegen.go","lineNumber":181,"sourceCode":"\n\t// if with-starter-kit flag is set and the same is not available for the framework, return error\n\tif o.withStarterKit && !hasStarterKit {\n\t\treturn errors.E(\n\t\t\top,\n\t\t\tfmt.Errorf(\n\t\t\t\t\"starter kit is not available for framework %s\",\n\t\t\t\tnewCodegenExecutionConfig.Framework,\n\t\t\t),\n\t\t)\n\t}\n\n\t// if with-starter-kit flag is not provided, give an option to clone a starterkit\n\tif !o.withStarterKit && hasStarterKit {\n\t\tshouldCloneStarterKit, err := util.GetYesNoPrompt(\n\t\t\t\"Do you also want to clone a starter kit for \" + newCodegenExecutionConfig.Framework + \"?\",\n\t\t)\n\t\tif err != nil {\n\t\t\treturn errors.E(op, fmt.Errorf(\"error in getting input from user: %w\", err))\n\t\t}\n\n\t\to.withStarterKit = shouldCloneStarterKit\n\t}\n\n\t// clone the starter kit\n\to.EC.Spin(\"Clonning the starter kit...\")\n\n\tif o.withStarterKit && hasStarterKit {\n\t\t// get a directory name to clone the starter kit in\n\t\tstarterKitDirname := newCodegenExecutionConfig.Framework\n\t\terr = util.FSCheckIfDirPathExists(\n\t\t\tfilepath.Join(o.EC.ExecutionDirectory, starterKitDirname),\n\t\t)\n\n\t\tsuffix := 2\n\t\tfor err == nil {\n\t\t\tstarterKitDirname = newCodegenExecutionConfig.Framework + \"-\" + strconv.Itoa(suffix)","sourceCodeStart":163,"sourceCodeEnd":199,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/cli/commands/actions_use_codegen.go#L163-L199","documentation":"Thrown when the yes/no prompt asking whether to also clone a starter kit (util.GetYesNoPrompt) fails — same class as other prompt failures: no interactive TTY on stdin because --with-starter-kit was omitted in a non-interactive run for a framework that has a starter kit.","triggerScenarios":"Running `hasura actions use-codegen --framework X` (with starter kit available) in CI/pipe/no-TTY context without passing --with-starter-kit or an explicit refusal flag.","commonSituations":"Automating use-codegen in CI where prompts cannot render; docker exec without -t.","solutions":["Always pass --with-starter-kit (or its negative) in scripts so the prompt is skipped.","Run interactively with a TTY if you want the prompt."],"exampleFix":"// before (CI)\nhasura actions use-codegen --framework nodejs-express\n// after\nhasura actions use-codegen --framework nodejs-express --with-starter-kit","handlingStrategy":"validation","validationCode":"[ -t 0 ] || echo 'pass --with-starter-kit explicitly in non-interactive shells'","typeGuard":null,"tryCatchPattern":"Catch prompt errors and re-run including --with-starter-kit (or its negative) explicitly.","preventionTips":["Always pass the starter-kit flag in scripts.","Use a TTY for interactive flows."],"tags":["interactive-prompt","tty","hasura-cli","ci"],"backgroundTag":"non-interactive-prompt-failed","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}