In the case that the script (for whatever reason) can't create the directory for haxelib setup (which happened in my case -- running in my home directory), it just fails. Thankfully, you can re-run the last few steps manually.
Is there any way to detect and robustly fail? In my case, the work-around was to (it's not safe, I know) chmod 777 to the haxelib directory.