{"record":{"id":"025014151dd910ea","repo":"gohugoio/hugo","slug":"aborted","errorCode":null,"errorMessage":"aborted","messagePattern":"aborted","errorType":"console","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/52c9bd7908b4d02d4d0ff8f82a888834d6ee10d2/deploy/deploy.go#L162-L198","documentation":"When deployment.confirm is enabled and the run is not a dry run, Hugo prints the diff summary and prompts 'Continue? (Y/n)'. Any answer that is not y/Y (or an empty/failed stdin read) causes Deploy to return this 'aborted' error. It is a user-initiated cancellation, not a system fault.","triggerScenarios":"`hugo deploy` with confirm enabled, where the user types n, anything other than y, or stdin is closed/empty (e.g. piped input).","commonSituations":"Reviewing the upload/delete diff and declining; non-interactive shells or CI piping empty stdin into an interactive prompt.","solutions":["Answer 'y' at the prompt to proceed with the deploy.","Set confirm=false in config (or --confirm=false) to skip the prompt in automation.","Use --dryRun to preview changes without prompting."],"exampleFix":"// before\nhugo deploy   # then type 'n'\n// after\nhugo deploy   # then type 'y'","handlingStrategy":"try-catch","validationCode":"// For automation, disable confirm so no prompt can abort\nviper.Set(\"deployment.confirm\", false)","typeGuard":null,"tryCatchPattern":"if err := deployer.Deploy(ctx); err != nil {\n    if err.Error() == \"aborted\" {\n        // user declined; treat as non-fatal cancellation\n        return nil\n    }\n    return err\n}","preventionTips":["Set confirm=false (or --confirm=false) in CI/non-interactive shells.","Use --dryRun to preview without prompting.","Provide real stdin when confirm is enabled."],"tags":["hugo","deploy","cli","interactive"],"backgroundTag":null,"analyzedSha":"52c9bd7908b4d02d4d0ff8f82a888834d6ee10d2","analyzedAt":"2026-08-09T21:49:36.660Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}