-
Notifications
You must be signed in to change notification settings - Fork 503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Treat paths in submodule relative to directory of root .justfile
#2222
Comments
I think this would be great. I can imagine a few options that might be useful:
The syntax could be:
|
#2283 added support for the form that takes a string: set working-dir := "some/other/directory" So we're still lacking the ability to use the working directory of a parent justfile. I think the best syntax for using the working directory of the parent is: set working-dir := super However, I'd like to keep the door open for eventually allowing the use of a variable. I.e.: set working-dir := foo
So, this syntax: set working-dir := super Would change meaning if the RHS of a setting became an expression: super := "hello"
set working-dir := super One option is to use some kind of syntax which isn't a valid expression: set working-dir := @super
set working-dir := super.working_dir
set working-dir := super::working_dir
set working-dir := super->working_dir
set working-dir := super#working_dir
set working-dir := super@working_dir This is a bit wonky, but the fact that expressions can't be used in setting values has been an issue many times, so I wouldn't want to preclude fixing it. |
This is all horrifically complicated by the fact that variables, recipes, and settings can all have the same name. |
It'd be great to have an option to treat all paths in a submodule relative to the directory containing the root
.justfile
. I think I'd prefer a per-module flag for this instead of a global one.This would allow me to let my submodules reside in other file locations (e.g. in a folder
.config/commands/
), while not having to issue acd {{justfile_directory()}}
orcd ../../
at the beginning of every recipe.The text was updated successfully, but these errors were encountered: