Skip to content

Commit

Permalink
Merge pull request #17 from ThreeDotsLabs/check-err
Browse files Browse the repository at this point in the history
Check error while reading solution files
  • Loading branch information
m110 authored Apr 25, 2024
2 parents 63e1cb0 + 5e2d3ce commit 02de1de
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions trainings/files/read.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"path/filepath"

"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/afero"

"github.com/ThreeDotsLabs/cli/trainings/genproto"
Expand All @@ -16,6 +17,11 @@ func (f Files) ReadSolutionFiles(trainingRootFs afero.Fs, dir string) ([]*genpro
trainingRootFs,
dir,
func(filePath string, info os.FileInfo, err error) error {
if err != nil {
logrus.WithError(err).Warn("Error while reading solution files")
return nil
}

if info.IsDir() {
return nil
}
Expand Down

0 comments on commit 02de1de

Please sign in to comment.