clburlison / bakeit

A platform agnostic chef bootstrap tool
MIT License
8 stars 0 forks source link

Need better error handling in checkExt #1

Closed clburlison closed 6 years ago

clburlison commented 6 years ago

Crash in checkExt

testing
Downloading https://packages.chef.io/files/stable/chef/13.6.4/mac_os_x/10.13/chef-13.6.4-1.dmg...
  200 OK
  transferred 12548617 / 49166602 bytes (25.52%)
  transferred 29211100 / 49166602 bytes (59.41%)
  transferred 44546569 / 49166602 bytes (90.60%)
Download saved to ./chef-13.6.4-1.dmg 
File type: zlib. MIME: application/zlib
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x42db227]

goroutine 1 [running]:
main.checkExt.func1(0x0, 0x0, 0x0, 0x0, 0x4523720, 0xc42042c420, 0x20, 0x434b900)
    /Users/clayton.burlison/Documents/src/go/src/github.com/clburlison/bakeit/cmd/bakeit/main.go:114 +0x47
path/filepath.Walk(0x0, 0x0, 0xc42021d0c0, 0xc4201502d0, 0xc4202ae000)
    /usr/local/go/src/path/filepath/path.go:401 +0x76
main.checkExt(0x438a705, 0x4, 0x0, 0x0, 0x0, 0xc42021d080, 0x2)
    /Users/clayton.burlison/Documents/src/go/src/github.com/clburlison/bakeit/cmd/bakeit/main.go:113 +0xa4
main.main()
    /Users/clayton.burlison/Documents/src/go/src/github.com/clburlison/bakeit/cmd/bakeit/main.go:78 +0xd73