Skip to content

Commit

Permalink
fix: combine errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dundee committed May 2, 2024
1 parent 6dbe7fe commit e887e2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/device/dev_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (t LinuxDevicesInfoGetter) GetMounts() (Devices, error) {
devices, err := readMountsFile(file)
if err != nil {
if cerr := file.Close(); cerr != nil {
return nil, fmt.Errorf("%w; %w", err, cerr)
return nil, fmt.Errorf("%w; %s", err, cerr.Error())

Check warning on line 31 in pkg/device/dev_linux.go

View check run for this annotation

Codecov / codecov/patch

pkg/device/dev_linux.go#L31

Added line #L31 was not covered by tests
}
return nil, err
}
Expand Down

0 comments on commit e887e2c

Please sign in to comment.