Open TomJo2000 opened 3 hours ago
Turns out this is probably something we should patch in the rust
package itself.
just
gets the value of the runtime_dir from dirs::runtime_dir()
https://github.com/casey/just/blob/5db910f400b13daa87b5c37dc62fb1da1ff6533d/src/recipe.rs#L371
Which is part of the Rust standard library. https://docs.rs/dirs/latest/dirs/fn.runtime_dir.html
So any Rust program using this function would be affected.
Okay, it looks like it uses the value of $XDG_RUNTIME_DIR
, which makes sense.
https://docs.rs/dirs/latest/src/dirs/lib.rs.html#173-175
https://docs.rs/dirs/latest/src/dirs/lin.rs.html#14
But I do not see where or how it is getting its fallback value if that environment variable is unset.
We do not currently set it by default, though setting the XDG basedir variables to sane defaults as part of the profile.d/
scripts would be something we may want to consider
On a related note.
It looks like we will need to fix any shebangs in justfile
s on the fly.
Otherwise the example given above fails with:
error: Recipe `bug` with shebang `#!/usr/bin/env sh` execution error: No such file or directory (os error 2)
I set $XDG_RUNTIME_DIR
to /data/data/com.termux/files/usr/var/run/user
for this example.
Problem description
Upon running any recipe defined in a
justfile
which runs any sort of command external tojust
, the recipe will fail withRead-only file system (os error 30)
.What steps will reproduce the bug?
Minimal example:
Output:
What is the expected behavior?
System information