fix: handle errors reading go licenses (#2985)

Signed-off-by: Keith Zantow <kzantow@gmail.com>
This commit is contained in:
Keith Zantow
2024-06-24 10:27:03 -04:00
committed by GitHub
parent f5a917a5a2
commit bd1c1d260c
4 changed files with 82 additions and 2 deletions
+1 -1
View File
@@ -87,7 +87,7 @@ func subFs(fsys afero.Fs, subDirs ...string) (afero.Fs, error) {
if errors.Is(err, afero.ErrFileNotFound) {
err = fsys.MkdirAll(dir, dirPermissions)
if err != nil {
return nil, fmt.Errorf("unable to create directory at '%s/%s': %v", dir, strings.Join(subDirs, "/"), err)
return nil, fmt.Errorf("unable to create directory at '%s': %v", dir, err)
}
stat, err = fsys.Stat(dir)
if err != nil {