Knowing whether knife bootstrap exited with error

Hi

I got a request (from an old thread here) to post the code I used to modify
the bootstrap process so I can tell whether it exited with error. I posted
a gist here if anybody is interested:

This is extracted from a large code base so if something doesn’t work,
please let me know. I may forgot to add something.

Bye

Haim