Skip to content

Handle error in Godep strip WalkFunc - #990

Closed
tonyghita wants to merge 1 commit into
Masterminds:masterfrom
tonyghita:fix-godep-strip
Closed

Handle error in Godep strip WalkFunc#990
tonyghita wants to merge 1 commit into
Masterminds:masterfrom
tonyghita:fix-godep-strip

Conversation

@tonyghita

Copy link
Copy Markdown

It seems like filepath.Walk has changed in Go1.10 in some way. When an error is present, info is nil.

Fixes #975.

@vkamra

vkamra commented May 14, 2018

Copy link
Copy Markdown

@mattfarina - this is similar to your fix #953 - in the godep code path. Can we get this in? Hitting this with Go 1.10

@danwinship

Copy link
Copy Markdown

While this patch works around the crash and is correct anyway, the real fix is to return filepath.SkipDir rather than nil if we call os.RemoveAll() later in the function (like in #956, although that also included a bunch of other refactoring)

@fxcoudert

Copy link
Copy Markdown

Can this fix (or an equivalent fix) please be merged, and a new release tagged? This is impacting distributors like Homebrew who ship go software.

@bacongobbler

bacongobbler commented Sep 28, 2018

Copy link
Copy Markdown
Contributor

https://github.com/Masterminds/glide/releases/tag/v0.13.2 was released yesterday with a bugfix for this particular issue. This stack trace in particular was fixed for Helm, so it's likely fixed for other projects. This PR may be defunct in that case and should probably be closed.

@danwinship

Copy link
Copy Markdown

0.13.2 includes #956, which fixes the crash when skipping vendor/ but not when skipping Godeps/_workspace/

@danwinship

Copy link
Copy Markdown

#1033 has the correct fix. This should be closed.

@tonyghita

Copy link
Copy Markdown
Author

Closing in favor of #1033

@tonyghita tonyghita closed this Jun 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Getting nil pointer dereference error when using --strip-vendor option after updating to Go 1.10

5 participants