{"record":{"id":"1603cf83f8e0ad24","repo":"phacility/phabricator","slug":"declining-to-apply-changes","errorCode":null,"errorMessage":"Declining to apply changes.","messagePattern":"Declining to apply changes\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"warning","filePath":"src/applications/repository/management/PhabricatorRepositoryManagementMovePathsWorkflow.php","lineNumber":128,"sourceCode":"        array(\n          'action',\n          'monogram',\n          'src',\n          'dst',\n        ));\n      $table->addRow($display);\n    }\n\n    $table->draw();\n\n    if (!$any_changes) {\n      $console->writeOut(pht('No matching repositories.').\"\\n\");\n      return 0;\n    }\n\n    $prompt = pht('Apply these changes?');\n    if (!$is_force && !phutil_console_confirm($prompt)) {\n      throw new Exception(pht('Declining to apply changes.'));\n    }\n\n    foreach ($rows as $row) {\n      if (empty($row['move'])) {\n        continue;\n      }\n\n      $repo = $row['repository'];\n\n      queryfx(\n        $repo->establishConnection('w'),\n        'UPDATE %T SET localPath = %s WHERE id = %d',\n        $repo->getTableName(),\n        $row['dst'],\n        $repo->getID());\n    }\n\n    $console->writeOut(pht('Applied changes.').\"\\n\");","sourceCodeStart":110,"sourceCodeEnd":146,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/repository/management/PhabricatorRepositoryManagementMovePathsWorkflow.php#L110-L146","documentation":"Thrown by `bin/repository move-paths` after it draws the table of proposed `localPath` rewrites: `phutil_console_confirm('Apply these changes?')` returned false — the operator answered 'n' at the prompt (or input was non-affirmative). It is an intentional abort before the `UPDATE %T SET localPath = ...` writes, so no repository rows were modified.","triggerScenarios":"Answering 'n' (or anything not starting with y) at the 'Apply these changes?' prompt; running interactively and dismissing the prompt; EOF/non-TTY input that fails to confirm affirmatively.","commonSituations":"Operators review the preview table, spot a wrong prefix, and decline; automated runs where stdin is not a TTY and confirm defaults to no.","solutions":["Fix whatever looked wrong in the preview table (--from/--to prefixes) and re-run, answering 'y'.","For unattended runs, pass `--force` to skip the prompt — only after verifying the prefixes.","If nothing needed changing, this abort is the correct outcome — verify with the 'No matching repositories.' path."],"exampleFix":"// before\n$ ./bin/repository move-paths --from /var/repos --to /srv/repos\nApply these changes? [y/N] n\n[1179] Declining to apply changes.\n\n// after\n$ ./bin/repository move-paths --from /var/repos --to /srv/repos --force   # unattended, prefixes verified","handlingStrategy":"validation","validationCode":"# Unattended/verified run: skip the interactive prompt deliberately\n./bin/repository move-paths --from \"$FROM\" --to \"$TO\" --force","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat this exception as a no-op abort: nothing was changed, just re-run with corrected flags.","Use --force only in unattended scripts after a dry-run review of the preview table.","Keep runs interactive when prefixes are uncertain so the prompt can catch mistakes."],"tags":["phabricator","phorge","cli","confirmation-prompt","aborted-by-user"],"backgroundTag":"user-confirmation-declined","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}