Skip to content

Commit

Permalink
Add missed error handling from nodeup lstat
Browse files Browse the repository at this point in the history
  • Loading branch information
justinsb committed Apr 8, 2017
1 parent e28c7be commit f98f078
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/nodeup/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ func main() {
}

fi, err := os.Lstat(procSelfExe)
if err != nil {
glog.Fatalf("error doing lstat on %q: %v", procSelfExe, err)
}
if fi.Mode()&os.ModeSymlink != os.ModeSymlink {
glog.Fatalf("file %v is not a symlink", procSelfExe)
}
Expand Down

0 comments on commit f98f078

Please sign in to comment.