fix: lake: leave run options for script (#3064)
Options passed to `lake script run <name>` / `lake run <name>` after the `<name>` will now be properly passed on through to the script rather than being consumed by Lake. The issue was reported [on Zulip](https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Lake.20script.20flag.20.22passthrough.22.3F/near/407734447).
This commit is contained in:
parent
b5b664e570
commit
fbcfe6596e
3 changed files with 3 additions and 1 deletions
|
|
@ -226,7 +226,7 @@ protected def list : CliM PUnit := do
|
|||
IO.println script.name
|
||||
|
||||
protected nonrec def run : CliM PUnit := do
|
||||
processOptions lakeOption
|
||||
processLeadingOptions lakeOption -- between `lake [script] run` and `<name>`
|
||||
let config ← mkLoadConfig (← getThe LakeOptions)
|
||||
let ws ← loadWorkspace config
|
||||
if let some spec ← takeArg? then
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ scripts/dismiss
|
|||
scripts/greet
|
||||
Hello, world!
|
||||
Hello, me!
|
||||
Hello, --me!
|
||||
Display a greeting
|
||||
|
||||
USAGE:
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ $LAKE update
|
|||
$LAKE script list | tee produced.out
|
||||
$LAKE run /greet | tee -a produced.out
|
||||
$LAKE script run greet me | tee -a produced.out
|
||||
$LAKE script run greet --me | tee -a produced.out
|
||||
$LAKE script doc greet | tee -a produced.out
|
||||
$LAKE script run hello | tee -a produced.out
|
||||
$LAKE script run dep/hello | tee -a produced.out
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue