question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is it normal to have no error on fastGet when a local path does not exist?

See original GitHub issue

I am using fastGet to download files from a remote SFTP. I have made some tests and unintentionally insert a non-existent path into localPath parameter.

When my code runs the path does not exist so the file was not downloaded

client.fastGet('/server/remote-path/file.zip', '/tmp/nonexistent-local-test-path/file.zip')

Is it ok? Could not have some kind of error or warning for the user knows that the file will not be downloaded?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
theophilusxcommented, Jul 22, 2021

mscdex/ssh2#1034

1reaction
theophilusxcommented, Jul 8, 2021

I should have also mentioned that until a fix is available from ssh2, you could add a path test and verify the destination path before calling fastGet(). If the issue cannot be resolved in the ssh2 module itself, I will likely add such a test to ssh2-sftp-client. However, I think it is better to wait and get a response from the ssh2 author before I do this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

fastGet/fastPut problems with node v14.2.0 · Issue #156 - GitHub
I've tried aainst a remote server as well as a local server running on vbox image with same results, so don't think it...
Read more >
Node.js ssh2-sftp-client Error: fastPut: No response from ...
I have no idea what causes this error, I've tried with different paths and get either bad path error or this. What could...
Read more >
5.3.1 - ssh2-sftp-client - npm
WARNING There is currently a regression error with versions of node ... The realPath() method now returns '' if the path does not...
Read more >
Ssh2-sftp-client NPM - npm.io
Path to remote file to be deleted. noErrorOK: boolean. If true, no error is raised when you try to delete a non-existent file....
Read more >
ssh2-sftp-client-fork - npm Package Health Analysis - Snyk
The realPath() method now returns '' if the path does not exist rather ... it will fail with an error about no available...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found