Skip to content
This repository has been archived by the owner on Feb 3, 2018. It is now read-only.

Ignore dirs/files with perms issues in ListPackages #163

Merged
merged 4 commits into from
Jan 29, 2017
Merged

Conversation

sdboyer
Copy link
Owner

@sdboyer sdboyer commented Jan 27, 2017

Fixes #154

@sdboyer sdboyer added the bug label Jan 27, 2017
@sdboyer sdboyer self-assigned this Jan 27, 2017
@sdboyer sdboyer added this to the v0.14.0 milestone Jan 27, 2017
@@ -203,6 +223,9 @@ func fillPackage(p *build.Package) error {
for _, file := range gofiles {
pf, err := parser.ParseFile(token.NewFileSet(), file, nil, parser.ImportsOnly|parser.ParseComments)
if err != nil {
if terr, ok := err.(*os.PathError); ok && terr.Err == syscall.Errno(syscall.EACCES) {
Copy link
Contributor

@freeformz freeformz Jan 28, 2017

Choose a reason for hiding this comment

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

BTW: You probably wanted to use os.IsPermission() here

Copy link
Contributor

Choose a reason for hiding this comment

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

So probably ...

if err != nil {
  if os.IsPermission(err) {
    continue
  }
  return err
}

Copy link
Owner Author

Choose a reason for hiding this comment

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

AHHHH that's what i was freakin looking for

@codecov-io
Copy link

codecov-io commented Jan 28, 2017

Current coverage is 78.88% (diff: 85.71%)

Merging #163 into master will decrease coverage by 0.08%

@@             master       #163   diff @@
==========================================
  Files            23         23          
  Lines          3653       3657     +4   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits           2885       2885          
- Misses          569        576     +7   
+ Partials        199        196     -3   

Powered by Codecov. Last update de17adc...e8811e9

@sdboyer sdboyer merged commit 7fb04c9 into master Jan 29, 2017
@sdboyer sdboyer deleted the lp-perms branch April 5, 2017 18:33
krisnova pushed a commit to krisnova/dep that referenced this pull request Apr 21, 2017
Ignore dirs/files with perms issues in ListPackages
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants