casey / just

🤖 Just a command runner
https://just.systems
Creative Commons Zero v1.0 Universal
21.33k stars 476 forks source link

Allow using earlier recipe parameters in later parameters without having them in outer scope #2381

Closed casey closed 1 month ago

casey commented 1 month ago

For some reason this works:

a := ''
target a *b=a:
  echo {{ b }}

But this doesn't:

a := ''
target a *b=a:
  echo {{ b }}

It should be possible to use the value of the a parameter without having a in the outer scope.

casey commented 1 month ago

Fixed in #2382, this was so close to working and so simple to fix, it even had a test which checked that it was an error. I hope past me didn't have a really good reason for not allowing this.