Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches: ["main"]
pull_request:

permissions:
contents: read

jobs:
rust:
name: Rust and script checks
Expand Down Expand Up @@ -45,12 +48,12 @@ jobs:
xvfb

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
with:
components: clippy, rustfmt

- name: Cache cargo
uses: Swatinem/rust-cache@v2
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2

- name: Format
run: cargo fmt --check
Expand Down Expand Up @@ -83,7 +86,7 @@ jobs:
uses: actions/checkout@v6

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable

- name: Install cargo-audit
run: cargo install cargo-audit --locked
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ jobs:
xvfb

- name: Install Rust (stable) with target
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
with:
# Register the rustup target so cargo can cross-compile; on the
# native ARM runner this is still needed when --target is passed.
targets: ${{ matrix.target }}

# Cache keyed per target so x86_64 and aarch64 don't overwrite each other.
- name: Cache cargo
uses: Swatinem/rust-cache@v2
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
with:
key: ${{ matrix.target }}

Expand All @@ -98,7 +98,7 @@ jobs:
# error) while still exercising the build.
- name: Upload release asset
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v3
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3
with:
tag_name: ${{ github.ref_name }}
files: agent-workspace-linux-${{ matrix.target }}
Expand Down
10 changes: 9 additions & 1 deletion npm/scripts/postinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,15 @@ function download(url, tmpFile, maxRedirects = 5) {
try {
fs.unlinkSync(tmpPath);
} catch (_) {}
console.error(`\nagent-workspace-linux: download failed — ${err.message}`);
// The download error text embeds the request URL (built from
// package.json's version + the target triple). Log a fixed message rather
// than interpolating that value, to avoid a log-injection sink; the URL
// itself is already printed above for debugging.
console.error(
"\nagent-workspace-linux: download failed. Verify the release exists " +
"for your platform and that the version in package.json matches " +
"(see the URL logged above)."
);
process.exit(1);
}

Expand Down