{"record":{"id":"b0dd08e7f92a21eb","repo":"composer/composer","slug":"failed-to-execute-command-n-n-processerroroutput","errorCode":null,"errorMessage":"Failed to execute {command}\\n\\n{processErrorOutput}","messagePattern":"Failed to execute (.+?)\\\\n\\\\n(.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"src/Composer/Downloader/SvnDownloader.php","lineNumber":198,"sourceCode":"                        '    ? - print help',\n                    ]);\n                    break;\n            }\n        }\n\n        return \\React\\Promise\\resolve(null);\n    }\n\n    /**\n     * @inheritDoc\n     */\n    protected function getCommitLogs(string $fromReference, string $toReference, string $path): string\n    {\n        if (Preg::isMatch('{@(\\d+)$}', $fromReference) && Preg::isMatch('{@(\\d+)$}', $toReference)) {\n            // retrieve the svn base url from the checkout folder\n            $command = ['svn', 'info', '--non-interactive', '--xml', '--', $path];\n            if (0 !== $this->process->execute($command, $output, $path)) {\n                throw new \\RuntimeException(\n                    'Failed to execute ' . implode(' ', $command) . \"\\n\\n\" . $this->process->getErrorOutput()\n                );\n            }\n\n            $urlPattern = '#<url>(.*)</url>#';\n            if (Preg::isMatchStrictGroups($urlPattern, $output, $matches)) {\n                $baseUrl = $matches[1];\n            } else {\n                throw new \\RuntimeException(\n                    'Unable to determine svn url for path '. $path\n                );\n            }\n\n            // strip paths from references and only keep the actual revision\n            $fromRevision = Preg::replace('{.*@(\\d+)$}', '$1', $fromReference);\n            $toRevision = Preg::replace('{.*@(\\d+)$}', '$1', $toReference);\n\n            $command = ['svn', 'log', '-r', $fromRevision.':'.$toRevision, '--incremental'];","sourceCodeStart":180,"sourceCodeEnd":216,"githubUrl":"https://github.com/composer/composer/blob/c435d285c9120efdca35696769c72ea9fdcc0466/src/Composer/Downloader/SvnDownloader.php#L180-L216","documentation":"Thrown inside SvnDownloader::getCommitLogs() when `svn info --non-interactive --xml <path>` exits non-zero. This code path only runs in verbose mode (composer update -v) for packages whose source references look like `@<revision>`, to print the changelog between the old and new revision. The exception bundles the exact failed command and svn's stderr so the failure is diagnosable.","triggerScenarios":"`composer update -v` on an SVN-sourced package where both old and new source references end in `@<digits>`; the checkout folder exists but `svn info` fails (lost network/auth, corrupted .svn metadata, server moved). The ProcessExecutor returns a non-zero exit code at SvnDownloader.php:197.","commonSituations":"Offline or VPN-disconnected runs with -v; expired/revoked SVN credentials after a credentials cache clear; a vendor dir whose .svn metadata was partially deleted; SVN server migrated to a new URL.","solutions":["Re-run without `-v`/`--verbose` to skip the changelog-fetching code path entirely (the install/update still works).","Re-establish SVN connectivity and credentials: run `svn info <repo-url>` manually in the vendor dir and authenticate.","If the .svn metadata is corrupt, delete vendor/<pkg> and let composer re-checkout.","Clear `svn-cache-credentials` misconfiguration in the repository config if auth is the root cause."],"exampleFix":"# before (triggers changelog fetch that needs svn server access)\ncomposer update vendor/pkg -vvv\n\n# after (skips getCommitLogs path)\ncomposer update vendor/pkg","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    $composer->getEventDispatcher()->dispatchScript(\\Composer\\Script\\ScriptEvents::POST_UPDATE_CMD);\n} catch (\\RuntimeException $e) {\n    if (str_starts_with($e->getMessage(), 'Failed to execute svn info')) {\n        // changelog fetch failed in verbose mode; safe to continue if the actual checkout succeeded\n        $io->writeError('<warning>SVN changelog unavailable: '.$e->getMessage().'</warning>');\n    } else {\n        throw $e;\n    }\n}","preventionTips":["Avoid running composer with -v/-vv in offline or credentials-uncertain environments.","Keep SVN credentials cached (do not set svn-cache-credentials false unless required).","Ensure network reachability to the SVN server before running verbose updates.","Treat changelog-fetch failures as non-fatal by catching them when invoking composer programmatically."],"tags":["svn","vcs","network","process","verbose"],"backgroundTag":null,"analyzedSha":"c435d285c9120efdca35696769c72ea9fdcc0466","analyzedAt":"2026-08-07T18:58:23.525Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}