Skip to content

Conversation

@neunenak
Copy link
Contributor

@neunenak neunenak commented Sep 1, 2024

The Subcommand::run function is a bit messy because it needs to handle the case where fallback is enabled and a missing recipe triggers searching for a new justfile further up the directory tree. This commit attempts to simplify the loop within Subcommand::run and make the logic generally easier to understand.

@casey
Copy link
Owner

casey commented Sep 2, 2024

Won't this lead to double compiling the first justfile, since it's already compiled before we call run?

@neunenak
Copy link
Contributor Author

neunenak commented Sep 5, 2024

Won't this lead to double compiling the first justfile, since it's already compiled before we call run?

Whoops, yeah. Added a commit that fixes this.

@casey casey enabled auto-merge (squash) September 6, 2024 21:37
@casey
Copy link
Owner

casey commented Sep 6, 2024

Nice, this is a great simplification!

@casey casey merged commit da17424 into casey:master Sep 6, 2024
@neunenak neunenak deleted the run-subcommand branch September 6, 2024 21:46
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

Successfully merging this pull request may close these issues.

2 participants