Skip to content

Commit d094beb

Browse files
committed
Trimmed error string
1 parent 33d7837 commit d094beb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

internal/cli/check-registry/check-registry_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func TestRegistryValidation(t *testing.T) {
1717
{"EmptyArg", "", "registry data file argument testdata is a folder, not a file"},
1818
{"NonExistentFile", "nonexistent.txt", "while loading registry data file: stat testdata/nonexistent.txt: no such file or directory"},
1919
{"InvalidDataFormat", "invalid-data-format.txt", "while loading registry data file: invalid line format (3 fields are required): https://github.com/arduino-libraries/SD.git|Partner;SD"},
20-
{"InvalidUrlFormat", "invalid-url-format.txt", "while filtering registry data file: Following URL are unknown or unsupported git repos:\nhttps://github.com/arduino-libraries/SD\n"},
20+
{"InvalidUrlFormat", "invalid-url-format.txt", "while filtering registry data file: Following URL are unknown or unsupported git repos:\nhttps://github.com/arduino-libraries/SD"},
2121
{"MissingType", "no-type.txt", "invalid type '' used by library 'SD'"},
2222
{"InvalidType", "invalid-type.txt", "invalid type 'foo' used by library 'SD'"},
2323
{"DuplicateRepoURL", "duplicate-url.txt", "registry data file contains duplicate URLs"},

internal/libraries/repolist.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ func (err GitURLsError) Error() string {
128128
fmt.Fprintln(error, v.URL)
129129
}
130130

131-
return error.String()
131+
return strings.TrimSpace(error.String())
132132
}
133133

134134
func filterReposBy(repos []*Repo, matcher repoMatcher) ([]*Repo, error) {

0 commit comments

Comments
 (0)