Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

fix(env): drop Intel macOS from the flake, and install pwsh and jq for web setup (#3776)

Maximilian Roos4d7f8c944ef3
diff --git a/Taskfile.yaml b/Taskfile.yaml
index 864d60a5a..97c848d13 100644
--- a/Taskfile.yaml
+++ b/Taskfile.yaml
@@ -53,22 +53,48 @@ tasks:
fi
echo "Rust version: $(rustc --version | awk '{print $2}')"
- # Install shells
+ # Install what the `shell-integration-tests` feature drives
echo ""
- echo "Installing shells for integration tests..."
+ echo "Installing shell-integration test dependencies..."
if command -v apt-get &> /dev/null; then
export DEBIAN_FRONTEND=noninteractive
+ # An `if` rather than an `&&` chain: under `set -e` a chain
+ # ending false takes the whole task down, and this one ends
+ # false both on an unmatched glob and on a `.list` file with
+ # no `[` line.
for f in /etc/apt/sources.list.d/*.list; do
- [ -f "$f" ] && grep -q '^\[' "$f" 2>/dev/null && rm -f "$f"
+ if [ -f "$f" ] && grep -q '^\[' "$f" 2>/dev/null; then
+ rm -f "$f"
+ fi
done
- if ! command -v zsh &> /dev/null || ! command -v fish &> /dev/null; then
+ # A missing pwsh joins the condition so one refresh serves both
+ # installs: apt resolves the PowerShell .deb's dependencies from
+ # these lists too.
+ if ! command -v zsh &> /dev/null || ! command -v fish &> /dev/null \
+ || ! command -v jq &> /dev/null || ! command -v pwsh &> /dev/null; then
apt-get update -qq
- apt-get install -y -qq zsh fish
+ apt-get install -y -qq zsh fish jq
+ fi
+ # PowerShell isn't in Debian's repos. Install the release .deb
+ # rather than the tarball: pwsh aborts at startup without libicu,
+ # and only the .deb declares that dependency for apt to resolve.
+ if ! command -v pwsh &> /dev/null; then
+ PWSH_VERSION="7.6.4"
+ URL="https://github.com/PowerShell/PowerShell/releases/download/v${PWSH_VERSION}/powershell_${PWSH_VERSION}-1.deb_amd64.deb"
+ TEMP=$(mktemp -d)
+ curl -fsSL -o "$TEMP/powershell.deb" "$URL"
+ apt-get install -y -qq "$TEMP/powershell.deb"
+ rm -rf "$TEMP"
+ echo "pwsh installed"
fi
fi
- for shell in bash zsh fish nu; do
- command -v "$shell" &> /dev/null || { echo "Error: $shell not found"; exit 1; }
- echo "$shell available"
+ # The shells the feature drives, plus the `jq` its Claude-hook tests
+ # pipe the hook payload through. Run each rather than looking for it
+ # on PATH, because a pwsh missing its libicu is on PATH and aborts at
+ # startup anyway.
+ for tool in bash zsh fish nu pwsh jq; do
+ "$tool" --version > /dev/null 2>&1 || { echo "Error: $tool not usable"; exit 1; }
+ echo "$tool available"
done
# Install gh CLI
diff --git a/flake.nix b/flake.nix
index aa39462a5..b19435704 100644
--- a/flake.nix
+++ b/flake.nix
@@ -19,7 +19,11 @@
rust-overlay,
crane,
}:
- flake-utils.lib.eachDefaultSystem (
+ # `eachDefaultSystem` minus x86_64-darwin: nixpkgs drops Intel macOS in
+ # 26.11, so that system stops evaluating once flake.lock advances past
+ # it. Release binaries still ship for Intel macOS (dist-workspace.toml);
+ # this is the Nix surface only.
+ flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" ] (
system:
let
overlays = [ (import rust-overlay) ];
@@ -212,8 +216,8 @@
powershell
jq
- # Development tools
- git
+ # Development tools. `git` comes from the `checks` above: crane
+ # folds each check's `nativeBuildInputs` in via `inputsFrom`.
gh
pre-commit
];
diff --git a/tests/CLAUDE.md b/tests/CLAUDE.md
index 8f6e53933..982c6fa98 100644
--- a/tests/CLAUDE.md
+++ b/tests/CLAUDE.md
@@ -14,7 +14,7 @@ cargo test --test integration --features shell-integration-tests # + shell tes
Every binary the suite spawns is `wt` itself — the mock commands are the same binary linked under other names, dispatching on argv[0] (`testing::mock_stub`) — so no run can spawn missing or stale code: cargo rebuilds a package's own binaries whenever its integration tests build, under every runner and filter, and the `CARGO_BIN_EXE_wt` the harness resolves at runtime names that just-built binary; outside a cargo runner the suite panics ("CARGO_BIN_EXE_wt not set") rather than guessing a path. `cargo build --bin wt` recompiling right after a test run is the bin-only build being a separate cached unit (a different feature graph), not evidence the tests ran stale code.
-**Claude Code web:** `task setup-web` installs zsh/fish/nushell, `gh`, and dev tools. Install `task` first if needed: `sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/bin` then `export PATH="$HOME/bin:$PATH"`. The permission tests (`test_permission_error_prevents_save`, `test_approval_prompt_permission_error`) skip automatically when running as root.
+**Claude Code web:** `task setup-web` installs zsh, fish, `jq`, PowerShell, `gh`, and dev tools, and checks that nushell is already there. Install `task` first if needed: `sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/bin` then `export PATH="$HOME/bin:$PATH"`. The permission tests (`test_permission_error_prevents_save`, `test_approval_prompt_permission_error`) skip automatically when running as root.
**Shell/PTY tests** (`shell-integration-tests` feature): approval prompts, picker, progressive rendering, shell wrappers.