-
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
feature request: function to get repository root directory #1522
Comments
If shell expansion were supported in the |
The The only thing that I could imagine doing would be adding So if you have:
|
I think this would be perfect. |
Thinking this through for an implementation a bit.
How far would the search work if Would you keep searching just the direct parent directories for a justfile or keep searching until If it just searches parents that means i would need an empty justfile at A counter proposal would be to allow for some special file that would be searched for to find the root ( |
I'm thinking that you would search parent directories up to
I don't think you would need to do this. Just would keep going up if it saw a directory with no
I like the idea of Whenever I'm thinking about a new feature, I'm thinking:
|
With
!include
support now it has allowed me to start using just in a monorepo and having shared rules and macroish rules that can allow for reuse.However including a common file is relative to the justfile that is being ran. So now when i start a new project I just have to be aware of the relative path to to the root of my repo and figure it out.
Example
This works for now but it would be nice to have this as just
I think this also means allowing evaluation in the include statement which may not be there.
A function also come in handy for docker commands and other things that may want to know about the root.
This could look for
.git
.hg` etc files, or could be a generic function to look up until a certain file/directory is found and return it or the base directory.The text was updated successfully, but these errors were encountered: