just icon indicating copy to clipboard operation
just copied to clipboard

Ability to use functions in settings definition

Open braunreyes opened this issue 3 years ago • 1 comments

My use case is being able to load a .env file from the invocation directory since my justfile is one level back at the root of the repo.

├── justfile
├── subdir
    ├── .env

something like this does not work

set dotenv-path := '{{invocation_directory()}}'

is this even possible given the way the functions are resolved?

braunreyes avatar Nov 21 '23 17:11 braunreyes

This is not currently possible. Setting values are so-called "const expression", which, among other restrictions, cannot call functions. #3254 tracks lifting this restriction for at least some functions.

casey avatar Jul 02 '26 05:07 casey