fix failing errors

This commit is contained in:
jguer 2022-11-14 00:25:14 +01:00
parent d7851223c6
commit fd46fa0f33
No known key found for this signature in database
GPG Key ID: 6D6CC9BEA8556B35
2 changed files with 2 additions and 2 deletions

View File

@ -40,7 +40,7 @@ func downloadPKGBUILDSource(ctx context.Context,
err := cmdBuilder.Show(
cmdBuilder.BuildMakepkgCmd(ctx, pkgBuildDir, args...))
if err != nil {
return ErrDownloadSource{inner: err}
return ErrDownloadSource{inner: err, pkgName: pkgBuildDir}
}
return nil

View File

@ -73,7 +73,7 @@ func Test_downloadPKGBUILDSourceError(t *testing.T) {
}
err := downloadPKGBUILDSource(context.TODO(), cmdBuilder, filepath.Join("/tmp", "yay-bin"), false)
assert.Error(t, err)
assert.EqualError(t, err, "error downloading sources: \x1b[36myay-bin\x1b[0m \n\t context: <nil> \n\t \n")
assert.EqualError(t, err, "error downloading sources: \x1b[36m/tmp/yay-bin\x1b[0m \n\t context: <nil> \n\t \n")
}
// GIVEN 5 packages