Skip to content

Commit

Permalink
Fix build script when no additional arguments is passed for ava
Browse files Browse the repository at this point in the history
  • Loading branch information
MangelMaxime committed Dec 31, 2023
1 parent 2bb955e commit e702d64
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
5 changes: 2 additions & 3 deletions src/Glutinum.Build/Main.fs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ Available commands:
Options:
--watch Watch for changes and re-run the tests
You can pass additional arguments to 'ava'
by using '--' followed by the arguments
For example: -- --match="**class**"
You can pass additional arguments to 'ava' by using '--' followed by the arguments
For example: ./build.sh test --watch -- --match="**class**"
cli Build the CLI tool
Options:
Expand Down
10 changes: 6 additions & 4 deletions src/Glutinum.Build/Test/Specs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ let handle (args: string list) =
let isWatch = args |> List.contains "--watch"

let additionalArgs =
args
|> List.skipWhile (fun x -> x <> "--")
|> List.skip 1
|> String.concat " "
let candidates = args |> List.skipWhile (fun x -> x <> "--")

if List.isEmpty candidates then
""
else
candidates |> List.skip 1 |> String.concat " "

Pnpm.install ()

Expand Down

0 comments on commit e702d64

Please sign in to comment.