[hack] Don't crash the Hack server every day
[hack] Don't crash the Hack server every day

Summary: Were you lucky enough to go for 24 hours without "hh_server intializing..."? Well, f you, have a crash!

I've found it by going to samples view of [[ https://fburl.com/172294928 | Bad Typechecker Exists ]] dashboard graph, logging to a random devserver and getting [[ P20243255 | stack trace ]] from it's logs. Hard to say how impactful it is, because logs are pretty noisy and "exit code 2" is shared with a bunch of other things.

TL;DR: Sys.is_directory throws an exception for symlinks pointing to deleted files

Reviewed By: dlreeves

Differential Revision: D2593692

fb-gh-sync-id: a22b082f9498d8b73e86ece913b31622be85ee3d

d14b3l/flow,facebook/flow,samwgoldman/flow,nmote/flow,ForbesLindesay/flow,jeffmo/flow,samwgoldman/flow,TiddoLangerak/flow,jeffmo/flow,jgrund/flow,AprilArcus/flow,mroch/flow,graue/flow,facebook/flow,fletcherw/flow,d14b3l/flow,nmote/flow,cesarandreu/flow,jdelStrother/flow,shiftcars/flow,JonathanUsername/flow,cesarandreu/flow,jamesgpearce/flow,graue/flow,nmote/flow,nmote/flow,popham/flow,ylu1317/flow,AprilArcus/flow,graue/flow,d14b3l/flow,AgentME/flow,samwgoldman/flow,nmote/flow,popham/flow,ylu1317/flow,chenglou/flow,ForbesLindesay/flow,JonathanUsername/flow,d14b3l/flow,gabelevi/flow,facebook/flow,fletcherw/flow,mroch/flow,TiddoLangerak/flow,cesarandreu/flow,JonathanUsername/flow,ForbesLindesay/flow,TiddoLangerak/flow,claudiopro/flow,AgentME/flow,nmote/flow,claudiopro/flow,jgrund/flow,fletcherw/flow,jamesgpearce/flow,d14b3l/flow,chenglou/flow,AprilArcus/flow,OCamlPro/flow,mroch/flow,jamesgpearce/flow,OCamlPro/flow,graue/flow,fletcherw/flow,mroch/flow,jeffmo/flow,jdelStrother/flow,ylu1317/flow,AprilArcus/flow,fletcherw/flow,jamesgpearce/flow,gabro/flow,popham/flow,ForbesLindesay/flow,shiftcars/flow,mroch/flow,popham/flow,gabelevi/flow,chenglou/flow,mroch/flow,jeffmo/flow,graue/flow,ForbesLindesay/flow,d14b3l/flow,shiftcars/flow,graue/flow,claudiopro/flow,ylu1317/flow,gabro/flow,facebook/flow,samwgoldman/flow,chenglou/flow,fletcherw/flow,gabro/flow,jamesgpearce/flow,AprilArcus/flow,OCamlPro/flow,jeffmo/flow,MichaelDeBoey/flow,gabelevi/flow,jgrund/flow,AgentME/flow,jgrund/flow,facebook/flow,JonathanUsername/flow,cesarandreu/flow,gabelevi/flow,MichaelDeBoey/flow,jdelStrother/flow,popham/flow,samwgoldman/flow,ylu1317/flow,shiftcars/flow,MichaelDeBoey/flow,gabro/flow,TiddoLangerak/flow,TiddoLangerak/flow,mroch/flow,shiftcars/flow,claudiopro/flow,samwgoldman/flow,JonathanUsername/flow,jeffmo/flow,chenglou/flow,gabro/flow,jgrund/flow,AprilArcus/flow,jdelStrother/flow,facebook/flow,AgentME/flow,chenglou/flow,popham/flow,MichaelDeBoey/flow,jdelStrother/flow,shiftcars/flow,JonathanUsername/flow,gabelevi/flow,nmote/flow,jgrund/flow,gabro/flow,gabelevi/flow,claudiopro/flow,popham/flow,samwgoldman/flow,AgentME/flow,MichaelDeBoey/flow,gabelevi/flow,facebook/flow,jamesgpearce/flow,jdelStrother/flow,jamesgpearce/flow,ForbesLindesay/flow,JonathanUsername/flow,OCamlPro/flow