{"record":{"id":"48d95400bfd3ef8e","repo":"abiosoft/colima","slug":"setup-cancelled","errorCode":null,"errorMessage":"setup cancelled","messagePattern":"setup cancelled","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"info","filePath":"model/runner.go","lineNumber":331,"sourceCode":"}\n\nfunc (r *ramalamaRunner) DisplayName() string {\n\treturn \"Ramalama\"\n}\n\nfunc (r *ramalamaRunner) ValidatePrerequisites(a app.App) error {\n\treturn validateCommonPrerequisites(a)\n}\n\nfunc (r *ramalamaRunner) EnsureProvisioned() error {\n\ts, _ := store.Load()\n\tif s.RamalamaProvisioned {\n\t\treturn nil\n\t}\n\n\tprompt := fmt.Sprintf(\"%s requires initial setup (this may take a few minutes depending on internet connection speed). Continue\", r.DisplayName())\n\tif !cli.Prompt(prompt) {\n\t\treturn fmt.Errorf(\"setup cancelled\")\n\t}\n\n\tseparator := \"────────────────────────────────────────\"\n\theader := fmt.Sprintf(\"Colima - %s Setup\\n%s\", r.DisplayName(), separator)\n\n\treturn terminal.WithAltScreen(ProvisionRamalama, header)\n}\n\nfunc (r *ramalamaRunner) BuildArgs(args []string) ([]string, error) {\n\treturn r.buildRamalamaArgs(args), nil\n}\n\n// EnsureModel ensures a ramalama model is available, pulling if necessary.\nfunc (r *ramalamaRunner) EnsureModel(modelName string) (string, error) {\n\tif err := EnsureRamalamaModel(modelName); err != nil {\n\t\treturn \"\", err\n\t}\n\treturn modelName, nil","sourceCodeStart":313,"sourceCodeEnd":349,"githubUrl":"https://github.com/abiosoft/colima/blob/c3a5f9184d83a197184f897a9f07eb3c01b3bc88/model/runner.go#L313-L349","documentation":"ramalamaRunner.EnsureProvisioned asks the user to consent to the one-time ramalama setup via cli.Prompt; declining (answering no, or EOF on a closed stdin) returns this error. It is a deliberate cancellation sentinel, not a malfunction — a constant message with no %w wrapping.","triggerScenarios":"Answering 'n' to the '<runner> requires initial setup ... Continue' prompt, or running from a non-interactive context (pipe, CI) where the prompt reads EOF and is treated as refusal.","commonSituations":"CI jobs or scripts invoking colima model for the first time with stdin redirected; users backing out when warned setup takes minutes.","solutions":["Re-run the command interactively and accept the prompt to proceed with setup","In automation, pre-provision the runner once in an interactive session, or feed an affirmative answer to stdin","Treat the error as a graceful cancel (exit quietly) rather than a failure when scripting around it"],"exampleFix":"// before\nreturn fmt.Errorf(\"setup cancelled\")\n\n// after (constant error; also silences govet's non-constant format string check)\nreturn errors.New(\"setup cancelled\")","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err := runner.EnsureProvisioned(); err != nil {\n\tif err.Error() == \"setup cancelled\" {\n\t\t// user declined: exit 0 quietly instead of printing an error\n\t\tfmt.Fprintln(os.Stderr, \"setup declined; aborting\")\n\t\tos.Exit(0)\n\t}\n\treturn err\n}","preventionTips":["Never run first-time interactive setup from non-interactive shells; provision beforehand","Distinguish user-cancel sentinels from real errors in wrapper scripts"],"tags":["user-input","cancellation","cli","interactive","go"],"backgroundTag":null,"analyzedSha":"c3a5f9184d83a197184f897a9f07eb3c01b3bc88","analyzedAt":"2026-08-15T18:58:08.334Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}