{"record":{"id":"be0087b6e73ef406","repo":"Canop/broot","slug":"unable-to-find-configuration-directories-be0087","errorCode":null,"errorMessage":"Unable to find configuration directories","messagePattern":"Unable to find configuration directories","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/shell_install/fish.rs","lineNumber":66,"sourceCode":"        return $code\n    end\nend\n\";\n\npub fn get_script() -> &'static str {\n    FISH_FUNC\n}\n\n/// return the root of fish's config\nfn get_fish_dir() -> PathBuf {\n    if let Some(base_dirs) = BaseDirs::new() {\n        let fish_dir = base_dirs.home_dir().join(\".config/fish\");\n        if fish_dir.exists() {\n            return fish_dir;\n        }\n    }\n    ProjectDirs::from(\"fish\", \"fish\", \"fish\") // hem...\n        .expect(\"Unable to find configuration directories\")\n        .config_dir()\n        .to_path_buf()\n}\n\n/// return the fish functions directory\nfn get_fish_functions_dir() -> PathBuf {\n    get_fish_dir().join(\"functions\")\n}\n\n/// return the path to the link to the function script\n///\n/// At version 0.10.4 we change the location of the script:\n/// It was previously with the link, but it's now in\n/// ~/.config/fish/functions/br.fish\nfn get_link_path() -> PathBuf {\n    get_fish_functions_dir().join(\"br.fish\")\n}\n","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/Canop/broot/blob/17204794d7c564f21d023c31f105c09ac169dd2d/src/shell_install/fish.rs#L48-L84","documentation":"Panic in get_fish_dir as a last-resort fallback: when ~/.config/fish does not exist (and BaseDirs was unavailable), the code probes ProjectDirs::from(\"fish\", \"fish\", \"fish\"); if even that returns None — no valid home/config directories on the system — the .expect panics. It means broot cannot locate any fish configuration directory in which to install its function.","triggerScenarios":"Thrown at src/shell_install/fish.rs:66 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Create ~/.config/fish so the primary detection branch succeeds","Ensure HOME is set and points to an existing readable directory","Install/configure fish itself so its standard config directory exists before running `broot install`"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"17204794d7c564f21d023c31f105c09ac169dd2d","analyzedAt":"2026-09-08T00:58:21.814Z","contentChangedAt":"2026-09-08T00:58:21.814Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}