gulp-ssh icon indicating copy to clipboard operation
gulp-ssh copied to clipboard

sftp write command not create interim directories

Open mojavelinux opened this issue 7 years ago • 4 comments

The sftp write command does not create interim missing directories. The dest command, on the other hand, does create them. I think the commands should be consistent, or there should be an option to control this behavior in both cases. Either way, I don't think the two commands should behave differently.

mojavelinux avatar Feb 07 '18 06:02 mojavelinux

I'd be happy to take this one on. I'll also add a test to verify the behavior of sftp write in both scenarios.

mojavelinux avatar Feb 07 '18 06:02 mojavelinux

If we decide to make this an option, we need to agree on the name. Perhaps something as simple as mkdirs: true.

mojavelinux avatar Feb 07 '18 06:02 mojavelinux

The dest command work as like as gulp.dest.

The sftp command should work as like as ssh2's sftp command.

zensh avatar Feb 07 '18 09:02 zensh

I see what you're saying. But I don't think the user of this library should have to be aware of the details of how ssh2 works. I could be okay with the current behavior as a default, as long as there is a way to enable making the directories. Having to stop a stream to make directories using a separate call would really disrupt the flow and elegance of the application code.

mojavelinux avatar Feb 07 '18 09:02 mojavelinux