Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/shfmt: handle errors properly in filepath.Walk
If the provided error is non-nil, info might be nil. We should check the error first. In practice, this only triggered with weird corner cases such as running 'shfmt -f /' inside a container, since some special files would give weird I/O errors. As such, it's hard to write a small test for this. The new code seems logical, and it's unlikely we'll break it again, so don't add a test for now. Fixes #466.
- Loading branch information