{"record":{"id":"521232c5ce5644cf","repo":"phacility/phabricator","slug":"the-local-disk-source-argument-must-point-to-a","errorCode":null,"errorMessage":"The \"--local-disk-source\" argument must point to a valid, readable directory on local disk.","messagePattern":"The \"--local-disk-source\" argument must point to a valid, readable directory on local disk\\.","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"error","filePath":"src/applications/files/management/PhabricatorFilesManagementMigrateWorkflow.php","lineNumber":70,"sourceCode":"      ->setName('migrate')\n      ->setSynopsis(pht('Migrate files between storage engines.'))\n      ->setArguments($arguments);\n  }\n\n  public function execute(PhutilArgumentParser $args) {\n\n    // See T13306. This flag allows you to import files from a backup of\n    // local disk storage into some other engine. When the caller provides\n    // the flag, we override the local disk engine configuration and treat\n    // it as though it is configured to use the specified location.\n\n    $local_disk_source = $args->getArg('local-disk-source');\n    if (strlen($local_disk_source)) {\n      $path = Filesystem::resolvePath($local_disk_source);\n      try {\n        Filesystem::assertIsDirectory($path);\n      } catch (FilesystemException $ex) {\n        throw new PhutilArgumentUsageException(\n          pht(\n            'The \"--local-disk-source\" argument must point to a valid, '.\n            'readable directory on local disk.'));\n      }\n\n      $env = PhabricatorEnv::beginScopedEnv();\n      $env->overrideEnvConfig('storage.local-disk.path', $path);\n    }\n\n    $target_key = $args->getArg('engine');\n    if (!$target_key) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Specify an engine to migrate to with `%s`. '.\n          'Use `%s` to get a list of engines.',\n          '--engine',\n          'files engines'));\n    }","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/files/management/PhabricatorFilesManagementMigrateWorkflow.php#L52-L88","documentation":"Error \"The \"--local-disk-source\" argument must point to a valid, readable directory on local disk.\" thrown in phacility/phabricator.","triggerScenarios":"Thrown at src/applications/files/management/PhabricatorFilesManagementMigrateWorkflow.php:70 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}