What I observed
Output from a successful postcreate hook is mixed into the path consumed by the zsh shell wrapper, so the wrapper cannot enter the created rift.
Reproduction
cargo build --locked
probe=$(mktemp -d /tmp/rift-hook-stdout.XXXXXX)
mkdir -p "$probe/source" "$probe/home"
cat > "$probe/source/.rift.toml" <<'TOML'
version = 1
[[hooks.postcreate]]
run = "printf hook-output"
TOML
RIFT_BIN="$PWD/target/debug/rift" PROBE="$probe" HOME="$probe/home" zsh -f <<'ZSH'
eval "$("$RIFT_BIN" shell-init zsh)"
rift init --here "$PROBE/source"
cd "$PROBE/source"
printf 'before=%s\n' "$PWD"
rift create --name child
printf 'status=%s after=%s\n' "$?" "$PWD"
ZSH
The wrapper exits 1 and leaves the shell in the source directory. Its error contains a combined hook-output and destination path:
rift:cd:6: no such file or directory: hook-output/private/tmp/.../.rifts/source/child
The child exists and the registry has both rows.
Expected
Hook stdout does not alter the path used by shell integration, and the wrapper enters the created child.
Actual
Hook stdout prefixes the destination path. The cd fails after creation has committed.
Environment
- Rift commit
757a22cb247f
- zsh on macOS 26.6.2, arm64, APFS
What I observed
Output from a successful
postcreatehook is mixed into the path consumed by the zsh shell wrapper, so the wrapper cannot enter the created rift.Reproduction
The wrapper exits 1 and leaves the shell in the source directory. Its error contains a combined hook-output and destination path:
The child exists and the registry has both rows.
Expected
Hook stdout does not alter the path used by shell integration, and the wrapper enters the created child.
Actual
Hook stdout prefixes the destination path. The
cdfails after creation has committed.Environment
757a22cb247f