{"record":{"id":"52d4b4e992fc9b42","repo":"sharkdp/fd","slug":"fd-list-details-is-not-supported-on-windows-un","errorCode":null,"errorMessage":"'fd --list-details' is not supported on Windows unless GNU 'ls' is installed.","messagePattern":"'fd --list-details' is not supported on Windows unless GNU 'ls' is installed\\.","errorType":"console","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/main.rs","lineNumber":484,"sourceCode":"\n                cmd\n            }\n        }\n    } else if cfg!(windows) {\n        use std::process::{Command, Stdio};\n\n        // Use GNU ls, if available\n        let gnu_ls_exists = Command::new(\"ls\")\n            .arg(\"--version\")\n            .stdout(Stdio::null())\n            .stderr(Stdio::null())\n            .status()\n            .is_ok();\n\n        if gnu_ls_exists {\n            gnu_ls(\"ls\")\n        } else {\n            return Err(anyhow!(\n                \"'fd --list-details' is not supported on Windows unless GNU 'ls' is installed.\"\n            ));\n        }\n    } else {\n        return Err(anyhow!(\n            \"'fd --list-details' is not supported on this platform.\"\n        ));\n    };\n    Ok(cmd)\n}\n\nfn extract_time_constraints(opts: &Opts) -> Result<Vec<TimeFilter>> {\n    let mut time_constraints: Vec<TimeFilter> = Vec::new();\n    if let Some(ref t) = opts.changed_within {\n        if let Some(f) = TimeFilter::after(t) {\n            time_constraints.push(f);\n        } else {\n            return Err(anyhow!(","sourceCodeStart":466,"sourceCodeEnd":502,"githubUrl":"https://github.com/sharkdp/fd/blob/ee20f426ddf338ac7ead5c5f00ea49258005caaf/src/main.rs#L466-L502","documentation":"--list-details shells out to an external `ls` to produce a long-format listing. On Windows there is no compatible native ls, so fd probes for GNU ls (`ls --version`) and falls back to this error (main.rs:484) when it is absent. Only Windows reaches this branch.","triggerScenarios":"Running `fd --list-details` on Windows without GNU coreutils installed. The Command::new(\"ls\").arg(\"--version\").status() check returns Err or the binary is missing.","commonSituations":"Vanilla Windows installs lacking Git-Bash/MSYS2/WLS; systems where ls is the PowerShell alias rather than GNU ls; fresh Windows machines.","solutions":["Install GNU coreutils on Windows (e.g., via scoop install coreutils, chocolatey, or Git for Windows which bundles GNU ls).","Ensure GNU ls is on PATH: `where ls` should resolve to a GNU binary.","Drop --list-details if a long listing is not required: `fd <pattern>`."],"exampleFix":"# before (Windows, no GNU ls)\nfd --list-details\n\n# after (install GNU coreutils, ensure on PATH)\nscoop install coreutils\nfd --list-details","handlingStrategy":"validation","validationCode":"if ls --version >/dev/null 2>&1; then\n  fd --list-details\nelse\n  echo \"GNU ls required on Windows for --list-details\" >&2; exit 1\nfi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Install GNU coreutils (scoop/chocolatey/Git for Windows) before using --list-details on Windows.","Verify `ls --version` succeeds in the same shell fd will use.","Omit --list-details on Windows-only CI unless GNU ls is guaranteed present."],"tags":["list-details","windows","external-dependency","cli"],"backgroundTag":null,"analyzedSha":"ee20f426ddf338ac7ead5c5f00ea49258005caaf","analyzedAt":"2026-08-09T08:21:40.573Z","contentChangedAt":"2026-08-09T08:21:40.573Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}