amoussard / sftp-deployment

Spend less time managing file transfers and more time coding. SFTP support for Atom.io to send and receive files directly in your server.
MIT License
76 stars 44 forks source link

Anything on stderr throws RemoteDirectoryNotCreatedException #94

Closed IkeLutra closed 8 years ago

IkeLutra commented 9 years ago

https://github.com/amoussard/sftp-deployment/blob/master/lib/connections/SftpConnection.js#L70 this line of code catches anything on stderr and throws an exception. I experienced this because my server was incorrectly configured and was outputting stdin: is not a tty to stderr even though the command succeeded. I can't think of a elegant way to handle this. Maybe throw a more generic error as it may have been that mkdir hasn't failed. It was quite confusing because it says it can't create that directory when that isn't actually the error. I will submit a PR if I get time.

amoussard commented 8 years ago

Hi @willotter,

I have merge your PR. I will take a look to add this functionality where it's needed.

Thank your for your contribution :)