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

fix: lake: leave run options for script #3064

Merged
merged 1 commit into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lake/Lake/CLI/Main.lean
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/lake/examples/scripts/expected.out
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ scripts/dismiss
scripts/greet
Hello, world!
Hello, me!
Hello, --me!
Display a greeting

USAGE:
Expand Down
1 change: 1 addition & 0 deletions src/lake/examples/scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down