spmjs / node-scp2

[MAINTAINER WANTED] A pure javascript scp program based on ssh2.
384 stars 96 forks source link

replace the homegrown prompt method with the prompt npm package #111

Open ansballard opened 6 years ago

ansballard commented 6 years ago

noticed that when I put the wrong path for my id_rsa a password prompt came up, but the text wasn't hidden as I typed as per most password prompts. So I replaced the prompt function in bin/scp2 with the prompt package and added the hidden option so your password won't be visible on screen as you type it.

Made sure to run process.exit(0) if errors are thrown from grabbing the password, e.g. hitting Ctrl+C, since that's what the original function seemed to do.