agoda-com / dotnet-build-metrics

Measure Compilation time of Dev local C# projects
Apache License 2.0
4 stars 4 forks source link

fix LastIndexOf(string) always returns length #20

Closed jeeyo closed 2 years ago

jeeyo commented 2 years ago

I found an error Unexpected issue while generating metrics - startIndex cannot be larger than length of string. (Parameter 'startIndex') and realized that gitUrl.LastIndexOf("/") always returns the length of gitUrl, so I searched for a solution and change it to gitUrl.LastIndexOf('/').