ssh2 icon indicating copy to clipboard operation
ssh2 copied to clipboard

Add support for env variables with SFTP client.

Open di-ov opened this issue 9 months ago • 3 comments

This relates to and closes this issue: https://github.com/mscdex/ssh2/issues/1433

I basically saw how this was implemented in the exec() method in client.js and did a similar implementation.

I seems that it might be better to add an additional parameter to the sftp() method, i.e. in client.js it would appear as sftp(env, cb), I wasn't entirely sure, what do you think? Thanks!

di-ov avatar Mar 04 '25 09:03 di-ov

@mscdex we also would like to have such a solution. May we expedite this one please? Thanks

angelparaskov avatar Mar 04 '25 10:03 angelparaskov

I seems that it might be better to add an additional parameter to the sftp() method, i.e. in client.js it would appear as sftp(env, cb)

That would be the preferred approach.

mscdex avatar Mar 04 '25 12:03 mscdex

@mscdex thanks for the help, I did the changes. If it looks okay, I'll have a look at updating the docs.

di-ov avatar Mar 05 '25 09:03 di-ov

All that's needed now is a unit test. You'll probably have to use one similar to the last one in the SFTP test script to verify the environment is being sent properly before starting the subsystem.

mscdex avatar Mar 26 '25 14:03 mscdex

@mscdex so this look okay right? Would you be able to include it in the next release?

di-ov avatar Apr 01 '25 08:04 di-ov

@mscdex I'd also be interested in this solution. Anything that can be done to support this / move this forward?

unbekanntes-pferd avatar Apr 09 '25 13:04 unbekanntes-pferd

Is there anything we could do, to speed this up?

angelparaskov avatar Apr 23 '25 07:04 angelparaskov

Yea, I really need this ASAP , so if we can help you somehow to speed the process let us know

vmiroslav avatar May 15 '25 08:05 vmiroslav

@mscdex it's been quite a while since this is open, would you able to at least give some pointers on when you plan to work this project? thanks!

di-ov avatar May 27 '25 08:05 di-ov

Is this repo still alive @mscdex ? Is there someone else that could approve merge requests?

angelparaskov avatar Aug 12 '25 07:08 angelparaskov

Landed in https://github.com/mscdex/ssh2/commit/c19a821454a9034824425a7d6cc74991021d377e.

mscdex avatar Aug 20 '25 17:08 mscdex