just path/to/recipe and (cd path/to; just recipe) should be equivalent
- Dominant language
- Rust
- Stars
- 35.8k
- Forks
- 846
- Avg merge
- 27m
- Merged PRs (30d)
- 3
Description
These are not equivalent in the context of `set fallback := true`
In parent directory, create following justfile:
```
set fallback := false
@test:
echo {{invocation_directory()}}
```
Create two sub-directories, `with` and `without`. In `with`, create the following justfile:
```
set fallback := true
```
In the parent, the following three commands all generate the same output:
```
just test
just with/test
just without/test
```
The last two differ from
```
( cd with; just test )
( cd without; just test )
```
(This makes it difficult to write generic recipes that can be inherited, since {{invocation_directory()}} is only reliable when invoked from the actual directory.)
Contributor guide
Research direction
Start by reproducing the three parent-directory commands and the two subshell commands with `set fallback` and `invocation_directory()`. Trace how path-based recipe invocation resolves fallback justfiles and compare it with execution from the target directory; done means both forms produce equivalent output without breaking fallback behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100