hasura/graphql-engine · error

error in getting input from user: %w

Error message

error in getting input from user: %w

What it means

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.

Source

Thrown at cli/commands/actions_use_codegen.go:181

	// if with-starter-kit flag is set and the same is not available for the framework, return error
	if o.withStarterKit && !hasStarterKit {
		return errors.E(
			op,
			fmt.Errorf(
				"starter kit is not available for framework %s",
				newCodegenExecutionConfig.Framework,
			),
		)
	}

	// if with-starter-kit flag is not provided, give an option to clone a starterkit
	if !o.withStarterKit && hasStarterKit {
		shouldCloneStarterKit, err := util.GetYesNoPrompt(
			"Do you also want to clone a starter kit for " + newCodegenExecutionConfig.Framework + "?",
		)
		if err != nil {
			return errors.E(op, fmt.Errorf("error in getting input from user: %w", err))
		}

		o.withStarterKit = shouldCloneStarterKit
	}

	// clone the starter kit
	o.EC.Spin("Clonning the starter kit...")

	if o.withStarterKit && hasStarterKit {
		// get a directory name to clone the starter kit in
		starterKitDirname := newCodegenExecutionConfig.Framework
		err = util.FSCheckIfDirPathExists(
			filepath.Join(o.EC.ExecutionDirectory, starterKitDirname),
		)

		suffix := 2
		for err == nil {
			starterKitDirname = newCodegenExecutionConfig.Framework + "-" + strconv.Itoa(suffix)

View on GitHub (pinned to 724551b9ae)

Solutions

  1. Always pass --with-starter-kit (or its negative) in scripts so the prompt is skipped.
  2. Run interactively with a TTY if you want the prompt.

Example fix

// before (CI)
hasura actions use-codegen --framework nodejs-express
// after
hasura actions use-codegen --framework nodejs-express --with-starter-kit
Defensive patterns

Strategy: validation

Validate before calling

[ -t 0 ] || echo 'pass --with-starter-kit explicitly in non-interactive shells'

Try / catch

Catch prompt errors and re-run including --with-starter-kit (or its negative) explicitly.

Prevention

When it happens

Trigger: 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.

Common situations: Automating use-codegen in CI where prompts cannot render; docker exec without -t.

Related errors


AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28). Data as JSON: /api/errors/49c19cb0db58ac0d. Report an issue: GitHub.