Skip to content

Commit

Permalink
bazel_testing: fix workspace name regexp to accept \r\n line ending (#…
Browse files Browse the repository at this point in the history
…3037)

Fixes #3034
  • Loading branch information
robfig authored Dec 20, 2021
1 parent d0d326e commit b6f1c12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion go/tools/bazel_testing/bazel_testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ func loadWorkspaceName(workspacePath string) (string, error) {
if err != nil {
return "", err
}
nameRe := regexp.MustCompile(`(?m)^workspace\(\s*name\s*=\s*("[^"]*"|'[^']*')\s*,?\s*\)$`)
nameRe := regexp.MustCompile(`(?m)^workspace\(\s*name\s*=\s*("[^"]*"|'[^']*')\s*,?\s*\)\s*$`)
match := nameRe.FindSubmatchIndex(workspaceData)
if match == nil {
return "", fmt.Errorf("%s: workspace name not set", workspacePath)
Expand Down

0 comments on commit b6f1c12

Please sign in to comment.