Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
cli-test: Cheat to find coreutils on Windows
Lorenz Leutgeb committed 2 months ago
commit 7a36f7e84e19da4c6dc7cc4f913f177cd3965b9b
parent a103d707d514c31bb69a1a4829ca1a58a68e7006
1 file changed +11 -0
modified crates/radicle-cli-test/src/lib.rs
@@ -535,6 +535,17 @@ fn bins(cwd: PathBuf) -> Vec<PathBuf> {
        )
    }

+
    #[cfg(windows)]
+
    {
+
        // Radicle CLI tests rely on various Unix coreutils
+
        // (such as `ls` and `touch`) being available.
+
        // On Windows, it is very likely that we can find them in the
+
        // following location.
+
        // Note that adding this path to the end of `$PATH` causes
+
        // no harm, even if the directory does not exist.
+
        bins.push(PathBuf::from(r#"C:\Program Files\Git\usr\bin"#));
+
    }
+

    // Add current working directory to `$PATH`,
    // this makes it more convenient to execute scripts during testing.
    bins.push(cwd);