Skip to content
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: Add systemwide justfile option #1120

Closed
cysp74 opened this issue Feb 24, 2022 · 1 comment
Closed

Feature request: Add systemwide justfile option #1120

cysp74 opened this issue Feb 24, 2022 · 1 comment

Comments

@cysp74
Copy link

cysp74 commented Feb 24, 2022

That would be beneficial in enterprise/corporate environment if justfile had systemwide (eg. /etc/justfile) location with and read as first + override any other justfile.

My suggestions at first iterations is:
Search priority for justfile:

  1. /etc/justfile
  2. /usr/share/just/justfile
  3. /usr/local/etc/justfile
  4. /etc/xdg/justfile

If justfile couldn't be found locations above, the just can search at local dir.

2nd iteration (better):
Justfile stored locations above can store recipes that override recipes in justfile in local directory.

Ty.

@casey
Copy link
Owner

casey commented Feb 24, 2022

Thank you for the issue!

You could place a justfile in /justfile, and it would be found from any subdirectory. You could also place a justfile in /root/justfile, and it would work whenever you were in root's home directory. The behavior of programs like bash which search particular directories in a particular order for config files is weird, so I wouldn't want to replicate that.

It would be surprising if a systemwide justfile took priority over one found in the normal way. Similarly, I think it would be surprising if a global justfile overrode local justfile recipes.

Recipe overriding the other way, where if a local justfile recipe is missing, just will look in an outer justfile, is covered in #1036.

@casey casey closed this as completed Feb 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants