{"id":"025014151dd910ea","repo":"gohugoio/hugo","slug":"aborted","errorCode":null,"errorMessage":"aborted","messagePattern":"aborted","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"deploy/deploy.go","lineNumber":180,"sourceCode":"\tif len(uploads)+len(deletes) == 0 {\n\t\tif !d.quiet {\n\t\t\td.logger.Println(\"No changes required.\")\n\t\t}\n\t\treturn nil\n\t}\n\tif !d.quiet {\n\t\td.logger.Println(summarizeChanges(uploads, deletes))\n\t}\n\n\t// Ask for confirmation before proceeding.\n\tif d.cfg.Confirm && !d.cfg.DryRun {\n\t\tfmt.Printf(\"Continue? (Y/n) \")\n\t\tvar confirm string\n\t\tif _, err := fmt.Scanln(&confirm); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif confirm != \"\" && confirm[0] != 'y' && confirm[0] != 'Y' {\n\t\t\treturn errors.New(\"aborted\")\n\t\t}\n\t}\n\n\t// Order the uploads. They are organized in groups; all uploads in a group\n\t// must be complete before moving on to the next group.\n\tuploadGroups := applyOrdering(d.cfg.Ordering, uploads)\n\n\tnParallel := d.cfg.Workers\n\tvar errs []error\n\tvar errMu sync.Mutex // protects errs\n\n\tfor _, uploads := range uploadGroups {\n\t\t// Short-circuit for an empty group.\n\t\tif len(uploads) == 0 {\n\t\t\tcontinue\n\t\t}\n\n\t\t// Within the group, apply uploads in parallel.","sourceCodeStart":162,"sourceCodeEnd":198,"githubUrl":"https://github.com/gohugoio/hugo/blob/8a468df065a75c1c7cf9f6850f32148746590ea5/deploy/deploy.go#L162-L198","documentation":"Raised in Deployer.Deploy (deploy/deploy.go:180) when `deployment.confirm` is enabled: after printing the upload/delete summary, Hugo prompts `Continue? (Y/n)` on stdin and returns `errors.New(\"aborted\")` if the reply doesn't start with 'y' or 'Y'. It signals the user (or a non-interactive stdin) declined the deployment — no changes were applied.","triggerScenarios":"`hugo deploy --confirm` (or `confirm = true` in the deployment config) where the operator types 'n' or anything not starting with y/Y at the prompt; also fires in CI when stdin supplies unexpected input to the prompt.","commonSituations":"Intentional cancellation after reviewing the change summary; running with `confirm` enabled in CI/cron where nothing can answer the prompt; piping input that doesn't match y/Y.","solutions":["If cancellation was intentional, nothing to fix — no files were uploaded or deleted.","For CI/automation, remove `--confirm` / set `confirm = false` so no prompt is issued; use `--dryRun` first if you want a preview step.","If you meant to proceed interactively, re-run and answer 'y' (or press Enter, which counts as yes)."],"exampleFix":"# before (CI script)\nhugo deploy --confirm\n\n# after\nhugo deploy --dryRun   # review step\nhugo deploy            # apply step, no prompt","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err := deployer.Deploy(ctx); err != nil {\n    if strings.Contains(err.Error(), \"aborted\") {\n        log.Println(\"deploy cancelled at confirmation prompt; re-run with --confirm or --force as appropriate\")\n        os.Exit(1)\n    }\n    return err\n}","preventionTips":["This fires when the interactive `--confirm` prompt is answered 'n' — in CI, don't use --confirm; run non-interactively","Review the dry-run summary first (`hugo deploy --dryRun`) so you can deploy without the confirmation gate","Treat 'aborted' as a deliberate user cancel, not a failure to retry"],"tags":["hugo","deploy","cli","user-abort"],"analyzedSha":"8a468df065a75c1c7cf9f6850f32148746590ea5","analyzedAt":"2026-07-31T21:23:07.045Z","schemaVersion":2}