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
default target must be declared first which gives problems with !include #1557
Comments
Justfiles are insensitive to order. You can do |
Justfiles are insensitive to order. You can do default: b before defining b
Sure, but that’s not the problem.
As outlined in my initial post. The problem is that “default” is ignored if it not the first target:
┌────
│ a:
│ echo 'AAA'
│
│ default: b
│
│ b:
│ echo 'BBB'
└────
`just' will still show `AAA'.
So as a consequence with `!include' files, you have to make a dummy external file to set the default target and make that the first line in the file as otherwise the first target of the first file will become the default target.
|
I think the correct long-term solution is to remove the limitation on where |
There's really 2 issues here:
You could solve 2 without solving 1. Of course, ideally both get fixed! ;-) |
just
will default to the first target/recipe, so ifdefault
isn't the first, it's ignored:$ cat justfile
When combined with
!include
which has to come before anything, you will need to do the following:And then set the
default
target indefault.just
in order to be able to define a default target.The text was updated successfully, but these errors were encountered: