trim off new line character

pull/13310/head
Steven Powell 2022-01-06 14:12:08 -08:00
parent 7eac7a5448
commit 2aef5c60ee
1 changed files with 2 additions and 1 deletions

View File

@ -147,7 +147,8 @@ func getSHA(operatingSystem, arch string) (string, error) {
if err != nil { if err != nil {
return "", fmt.Errorf("failed to read file %q: %v", filePath, err) return "", fmt.Errorf("failed to read file %q: %v", filePath, err)
} }
return string(b), nil // trim off new line character
return string(b[:len(b)-1]), nil
} }
func updateJSON(path string, r releases) error { func updateJSON(path string, r releases) error {