{"record":{"id":"8f76a6701ae09e7a","repo":"composer/composer","slug":"fossil-was-not-found-check-that-it-is-installed-a","errorCode":null,"errorMessage":"fossil was not found, check that it is installed and in your PATH env.\n\n${errorOutput}","messagePattern":"fossil was not found, check that it is installed and in your PATH env\\.\n\n(.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"src/Composer/Repository/Vcs/FossilDriver.php","lineNumber":76,"sourceCode":"\n            $localName = Preg::replace('{[^a-z0-9]}i', '-', $this->url);\n            $this->repoFile = $this->config->get('cache-repo-dir') . '/' . $localName . '.fossil';\n            $this->checkoutDir = $this->config->get('cache-vcs-dir') . '/' . $localName . '/';\n\n            $this->updateLocalRepo();\n        }\n\n        $this->getTags();\n        $this->getBranches();\n    }\n\n    /**\n     * Check that fossil can be invoked via command line.\n     */\n    protected function checkFossil(): void\n    {\n        if (0 !== $this->process->execute(['fossil', 'version'], $ignoredOutput)) {\n            throw new \\RuntimeException(\"fossil was not found, check that it is installed and in your PATH env.\\n\\n\" . $this->process->getErrorOutput());\n        }\n    }\n\n    /**\n     * Clone or update existing local fossil repository.\n     */\n    protected function updateLocalRepo(): void\n    {\n        assert($this->repoFile !== null);\n\n        $fs = new Filesystem();\n        $fs->ensureDirectoryExists($this->checkoutDir);\n\n        if (!is_writable(dirname($this->checkoutDir))) {\n            throw new \\RuntimeException('Can not clone '.Url::sanitize($this->url).' to access package information. The \"'.$this->checkoutDir.'\" directory is not writable by the current user.');\n        }\n\n        // update the repo if it is a valid fossil repository","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/composer/composer/blob/c435d285c9120efdca35696769c72ea9fdcc0466/src/Composer/Repository/Vcs/FossilDriver.php#L58-L94","documentation":"Thrown by FossilDriver::checkFossil() when `fossil version` exits non-zero. The fossil binary is not found or not executable from the current environment. The process error output is appended to guide diagnosis.","triggerScenarios":"Any FossilDriver operation (initialize()) on a host where the fossil SCM binary is not installed or not on PATH.","commonSituations":"Minimal containers/CI images without fossil installed; PATH not inherited by the process; permissions preventing execution.","solutions":["Install fossil (e.g. apt-get install fossil, or download the single static binary from fossil-scm.org).","Ensure the fossil binary is on PATH for the process running Composer.","In Docker/CI, add an install step to the image."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"$proc = new \\Composer\\Util\\ProcessExecutor();\nif ($proc->execute(['fossil', 'version'], $out) !== 0) {\n    throw new \\RuntimeException('fossil binary not available; install it and add to PATH.');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Ensure fossil is installed and on PATH before using FossilDriver.","Add a fossil install step to CI/container images.","Guard against this by probing `fossil version` at startup in environments you don't control."],"tags":["composer","vcs","fossil","environment","dependencies"],"backgroundTag":null,"analyzedSha":"c435d285c9120efdca35696769c72ea9fdcc0466","analyzedAt":"2026-08-07T18:58:23.525Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}