diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6f3546f2aca..e27397b6f9c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -177,6 +177,9 @@ jobs: - name: Install Rust run: rustup update stable && rustup default stable && rustup target add ${{ matrix.target }} - uses: Swatinem/rust-cache@v2 + - run: set +x; for name in gix-sec; do (cd $name && cargo build --target ${{ matrix.target }}); done + name: "WASI only: crates without feature toggle" + if: endsWith(matrix.target, '-wasi') - run: set +x; for name in gix-actor gix-attributes gix-bitmap gix-chunk gix-command gix-commitgraph gix-config-value gix-date gix-glob gix-hash gix-hashtable gix-mailmap gix-object gix-packetline gix-path gix-pathspec gix-prompt gix-quote gix-refspec gix-revision gix-traverse gix-url gix-validate; do (cd $name && cargo build --target ${{ matrix.target }}); done name: crates without feature toggles - run: set +x; for feature in progress fs-walkdir-parallel parallel io-pipe crc32 zlib zlib-rust-backend fast-sha1 rustsha1 cache-efficiency-debug; do (cd gix-features && cargo build --features $feature --target ${{ matrix.target }}); done diff --git a/gix-sec/src/identity.rs b/gix-sec/src/identity.rs index a9633b18f8a..9fcdc2cb84d 100644 --- a/gix-sec/src/identity.rs +++ b/gix-sec/src/identity.rs @@ -17,7 +17,15 @@ pub fn is_path_owned_by_current_user(path: &Path) -> std::io::Result { impl_::is_path_owned_by_current_user(path) } -#[cfg(not(windows))] +// Wasi doesn't have a concept of a user, so this is implicitly true. +#[cfg(target_os = "wasi")] +mod impl_ { + pub fn is_path_owned_by_current_user(_path: &std::path::Path) -> std::io::Result { + Ok(true) + } +} + +#[cfg(all(not(windows), not(target_os = "wasi")))] mod impl_ { use std::path::Path;