Skip to content

Commit

Permalink
Add quotes to filterexpression (#1940)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAngryByrd authored Oct 3, 2023
1 parent a06a859 commit f8443ae
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Components/TestExplorer.fs
Original file line number Diff line number Diff line change
Expand Up @@ -574,12 +574,12 @@ module DotnetCli =
let filter =
match filterExpression with
| None -> Array.empty
| Some filterExpression -> [| "--filter"; filterExpression |]
| Some filterExpression -> [| "--filter"; $"\"{filterExpression}\"" |]

if filter.Length > 0 then
logger.Debug("Filter", filter)

let! _, stdOutput, stdError =
let! errored, stdOutput, stdError =
dotnetTest
cancellationToken
projectPath
Expand All @@ -588,7 +588,9 @@ module DotnetCli =
shouldDebug
[| "--no-build"; yield! filter |]

logger.Debug("Test run exitCode", stdError)
match errored with
| Some error -> logger.Error("Test run failed - %s - %s - %s", error, stdOutput, stdError)
| None -> logger.Debug("Test run exitCode - %s - %s", stdOutput, stdError)

return (stdOutput + stdError)
}
Expand Down

0 comments on commit f8443ae

Please sign in to comment.