Skip to content
This repository was archived by the owner on Jun 25, 2022. It is now read-only.

check file is not a directory when returned as a file#214

Merged
markbates merged 2 commits intogobuffalo:masterfrom
utilitywarehouse:fix-directory-read-as-file
Jun 28, 2019
Merged

check file is not a directory when returned as a file#214
markbates merged 2 commits intogobuffalo:masterfrom
utilitywarehouse:fix-directory-read-as-file

Conversation

@rickyshrestha
Copy link
Contributor

@rickyshrestha rickyshrestha commented Jun 28, 2019

fix for #203

"github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/errx"
"github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/oncer"
"github.com/markbates/oncer"
"github.com/pkg/errors"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Th pkg/errors package has recently been removed from packr, can you please remove its use?

"github.com/karrick/godirwalk"
"github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/errx"
"github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/oncer"
"github.com/markbates/oncer"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please revert back to using the internal packages and not their external paths?


if len(ctx.SrcDirs()) == 0 {
err = fmt.Errorf("no src directories found")
err = errors.New("no src directories found")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert this line


if err != nil {
if !strings.Contains(err.Error(), "cannot find package") {
if _, ok := errx.Unwrap(err).(*build.NoGoError); !ok {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert this line

@rickyshrestha
Copy link
Contributor Author

changes are now made on the latest version.

@markbates markbates merged commit 0e984b9 into gobuffalo:master Jun 28, 2019
@markbates
Copy link
Member

Thanks! I’ll do a release shortly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants