Skip to content

Commit

Permalink
fix build script
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Sverdlov <[email protected]>
  • Loading branch information
sverdlov93 committed Sep 12, 2023
1 parent d474553 commit 6d4d064
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xray/utils/sarifutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ func ExtractRelativePath(resultPath string, projectRoot string) string {

// Get relative path
relativePath := strings.ReplaceAll(resultPath, projectRoot, "")
return strings.TrimPrefix(relativePath, string(filepath.Separator))
trimSlash := strings.TrimPrefix(relativePath, string(filepath.Separator))
return strings.TrimPrefix(trimSlash, "/")
}

func GetResultSeverity(result *sarif.Result) string {
Expand Down

0 comments on commit 6d4d064

Please sign in to comment.