just
just copied to clipboard
Test failure in 1.49.0 - Call to function `runtime_directory` failed: runtime directory not found
I am building just and running tests in a debian container on mac and linux.
All tests pass on 1.48.1 but the following test fails on 1.49.0
It's possible this is due to developing in a container but thought I would raise it
---- directories::runtime_directory stdout ----
Bad status: Diff < left / right > :
Some(
< 1,
> 0,
)
Bad stderr: Diff < left / right > :
<error: Call to function `runtime_directory` failed: runtime directory not found
< ——▶ justfile:1:6
< │
<1 │ x := runtime_directory()
< │ ^^^^^^^^^^^^^^^^^
<
In case it helps this is how I spin up my just dev environment
FROM rust:1-bookworm
# Install system dependencies used by dev workflow
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends \
ripgrep \
shellcheck \
pkg-config \
sudo \
zsh \
&& apt-get autoremove -y && apt-get clean -y && rm -fr /var/lib/apt/lists/*
# Create non-root user
RUN useradd -m -s /bin/zsh bluefing \
&& echo "bluefing ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/bluefing
# Ensure clippy and rustfmt are available
RUN rustup component add clippy rustfmt
# Switch to non-root user for development
USER bluefing
ENV USER=bluefing
services:
dev:
build:
context: .
dockerfile: Dockerfile
volumes:
- just-home:/home/bluefing
- ..:/workspaces/just:cached
user: bluefing
command: sleep infinity
volumes:
just-home:
docker compose -f docker-compose.yml run dev zsh
For completeness - tests running on 1.48.1 work
test readme::readme ... ok
test result: ok. 1158 passed; 0 failed; 8 ignored; 0 measured; 0 filtered out; finished in 1.51s
just on î‚ HEAD (c8c7d82) [$?] is 📦 v1.48.1 via 🦀 v1.94.1 took 2s
Failure on 1.49.0
failures:
---- directories::runtime_directory stdout ----
Bad status: Diff < left / right > :
Some(
< 1,
> 0,
)
Bad stderr: Diff < left / right > :
<error: Call to function `runtime_directory` failed: runtime directory not found
< ——▶ justfile:1:6
< │
<1 │ x := runtime_directory()
< │ ^^^^^^^^^^^^^^^^^
<
thread 'directories::runtime_directory' (55492) panicked at tests/directories.rs:97:6:
Output mismatch.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failures:
directories::runtime_directory
test result: FAILED. 1224 passed; 1 failed; 8 ignored; 0 measured; 0 filtered out; finished in 1.69s
error: test failed, to rerun pass `--test integration`
just on î‚ HEAD (7706216) [$?] is 📦 v1.49.0 via 🦀 v1.94.1 took 3s
I believe that runtime_directory does not exist on macOS, and on Linux it requires $XDG_RUNTIME_DIR to be set.
Confirmed - tests pass on 1.49.0 with
XDG_RUNTIME_DIR=/tmp cargo test --test integration