jcoglan/vault — pull request #23 by joewreschnig (2014-05-30 16:51:08+00:00)
Title: Workaround node-pw eating Ctrl-C / SIGINT.

node-pw exits with code 0 (success) if you press Ctrl-C while entering your password. This is awful.

This installs a process exit handler for the duration of the password prompt that catches exiting with code 0 and instead exits with code 130. This is very slightly less awful.

There's a good chance you won't want this because it is a gross gross thing, but I need it for vault to work properly in shell scripts, and figured I might as well let you know node-pw is terrible. I've already filed https://github.com/substack/node-pw/pull/6 with a proper fix but it also seems dead.