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

execCommand mistakenly removes empty content at the beginning and end of a file.

Open TerryChan opened this issue 2 years ago • 2 comments

When I used the execCommand method to execute the git command "git show --textconv HEAD:README.md" in order to retrieve the content of a file, I noticed that it trimmed any empty lines at the beginning and end of the file.

This issue has been reported in ssh2 and more details can be found there. But it's not issue of ssh2.

TerryChan avatar Apr 25 '23 03:04 TerryChan

I would be happy to accept a PR for this (along with some test cases)!

steelbrain avatar Apr 30 '23 10:04 steelbrain

For what it's worth, the output gets trimmed here.

szakharchenko avatar Aug 18 '23 12:08 szakharchenko