File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,11 @@ type RETURN_CODE =
3838 | SUCCESS = 0
3939 | FAIL = 1
4040
41+ let truncate ( valuesToTake : int ) ( args : string array ) : string array =
42+ match valuesToTake = - 1 with
43+ | true -> args
44+ | false -> args |> Array.truncate valuesToTake
45+
4146let getWorkflowNewPath () =
4247 Path.Combine [| Directory.GetCurrentDirectory(); " workflow.new.yml" |]
4348
@@ -65,11 +70,10 @@ let main (args: string array) : int =
6570 let! workflowKey = GitHubHelpers.getWorkflowKey ()
6671
6772 let tags =
68- match valuesToTake = - 1 with
69- | true -> args
70- | false -> args |> Array.truncate valuesToTake
73+ args
7174 |> Array.map ( fun s -> s.Split( ' ' ) |> Array.filter ( String.IsNullOrEmpty >> not ))
7275 |> Array.concat // flat
76+ |> truncate valuesToTake
7377
7478 do ! Validations.validateTagsAreNotEmpty tags
7579
You can’t perform that action at this time.
0 commit comments