{"record":{"id":"91fd5427c6cca590","repo":"Morganamilo/paru","slug":"file-manager-did-not-execute-successfully","errorCode":null,"errorMessage":"file manager '{}' did not execute successfully","messagePattern":"file manager '(.+?)' did not execute successfully","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/install.rs","lineNumber":1600,"sourceCode":"    config: &Config,\n    fetch: &aur_fetch::Fetch,\n    fm: &str,\n    pkgs: &[&str],\n) -> Result<tempfile::TempDir> {\n    let has_diff = fetch.has_diff(pkgs)?;\n    fetch.save_diffs(&has_diff)?;\n    let view = tempfile::Builder::new().prefix(\"aur\").tempdir()?;\n    fetch.make_view(view.path(), pkgs, &has_diff)?;\n    run_file_manager(config, fm, view.path())?;\n    Ok(view)\n}\n\nfn run_file_manager(config: &Config, fm: &str, dir: &Path) -> Result<()> {\n    let mut cmd = Command::new(fm);\n    cmd.args(&config.fm_flags).arg(dir).current_dir(dir);\n    let ret =\n        command_status(&mut cmd).with_context(|| tr!(\"failed to execute file manager: {}\", fm))?;\n    ensure!(\n        ret.success().is_ok(),\n        tr!(\"file manager '{}' did not execute successfully\", fm)\n    );\n    Ok(())\n}\n\nfn print_dir(\n    config: &Config,\n    pkgdir: &Path,\n    path: &Path,\n    stdin: &mut impl Write,\n    buf: &mut Vec<u8>,\n    bat: bool,\n    recurse: u32,\n) -> Result<()> {\n    {\n        let c = config.color;\n        let has_pkgbuild = path.join(\"PKGBUILD\").exists();","sourceCodeStart":1582,"sourceCodeEnd":1618,"githubUrl":"https://github.com/Morganamilo/paru/blob/9ac3578807a87858651e81a02586ceb947686e7c/src/install.rs#L1582-L1618","documentation":"run_file_manager launches the configured file manager (e.g. in the review/directory- browsing flow) with command_status; if the process runs but exits non-zero, this ensure fails. The preceding context reports 'failed to execute file manager: <fm>' for spawn failures; this error covers exit-code failures.","triggerScenarios":"config.fm (or default) points to a file manager binary that exists but exits with a non-zero status when opened on the build/review directory — e.g. ranger/nautilus failing on the given dir or bad fm_flags.","commonSituations":"fm_flags in paru.conf containing options the file manager doesn't support; file manager crashing on unusual filenames in the build dir; terminal-based FM run without a TTY.","solutions":["Test the file manager manually: <fm> <dir> and fix its exit failure","Check fm_flags in paru.conf for invalid options and remove them","Set file manager to a known-working one, e.g. paru.conf: FileManager = ranger"],"exampleFix":"// before (paru.conf)\n[options]\nFileManager = nemo\nFmFlags = --bogus-flag\n// after\n[options]\nFileManager = ranger","handlingStrategy":"try-catch","validationCode":"command -v \"$FM\" >/dev/null 2>&1 || echo \"file manager missing: $FM\"\n\"$FM\" \"$DIR\" && echo ok || echo \"FM exits nonzero\"","typeGuard":null,"tryCatchPattern":"match run_file_manager(config, fm, dir) {\n    Err(e) => {\n        eprintln!(\"{} (check fm_flags and try running the FM manually)\", e);\n    }\n    Ok(()) => {}\n}","preventionTips":["Verify the configured file manager runs successfully on any directory","Keep fm_flags minimal and valid for the chosen FM","Run terminal file managers only inside a TTY context"],"tags":["process","file-manager","exit-code"],"backgroundTag":"command-exit-nonzero","analyzedSha":"9ac3578807a87858651e81a02586ceb947686e7c","analyzedAt":"2026-09-12T04:57:59.861Z","contentChangedAt":"2026-09-12T04:57:59.861Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}