Skip to content

Commit 648b411

Browse files
matteosuppocmaglie
authored andcommitted
Avoid panic on empty lines
1 parent 1e18c69 commit 648b411

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

repos.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ func RemoveRepository(repo *Repository, configFolderPath string) error {
230230
for scanner.Scan() {
231231
line := scanner.Text()
232232
r := parseAPTConfigLine(line)
233-
if r.Equals(repo) {
233+
if r!= nil && r.Equals(repo) {
234234
// Filter repo configs that match the repo to be removed
235235
continue
236236
}

0 commit comments

Comments
 (0)