Working Directory
By default, recipes run with the working directory set to the directory that
contains the justfile
.
The [no-cd]
attribute can be used to make recipes run with the working
directory set to directory in which just
was invoked.
@foo:
pwd
[no-cd]
@bar:
pwd
$ cd subdir
$ just foo
/
$ just bar
/subdir
You can override working directory with set working-directory := '…'
, whose value
is relative to the default working directory.
set working-directory := 'bar'
@foo:
pwd
$ pwd
/home/bob
$ just foo
/home/bob/bar