-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CopyFilesOverSSH] Migrated to ssh2-sftp-client library #13312
[CopyFilesOverSSH] Migrated to ssh2-sftp-client library #13312
Conversation
53385bb
to
b9a6cfd
Compare
defer.resolve(true); | ||
} | ||
}) | ||
if (await this.sftpClient.stat(path)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What a point to use stat
method here? I assume we can use the exists method from ssh2-sftp-client. So code be more clear:
const isPathExist: boolean = await this.sftpClient.exists(path);
defer.resolve(isPathExist);
9298ae8
to
07a0004
Compare
9792663
to
4a70555
Compare
4a70555
to
402ae4b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
*/ | ||
private unixyPath(filePath) { | ||
if (process.platform === 'win32') { | ||
return filePath.replace(/\\/g, '/'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it works fine with full paths like 'C:\test\etc' which can contain ":"?
402ae4b
to
ed8ee28
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks, but also please take a look at the comment.
Tasks/CopyFilesOverSSHV0/task.json
Outdated
@@ -17,8 +17,8 @@ | |||
"author": "Microsoft Corporation", | |||
"version": { | |||
"Major": 0, | |||
"Minor": 172, | |||
"Patch": 3 | |||
"Minor": 173, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please bump up task version.
ed8ee28
to
05c87c6
Compare
Task name: CopyFilesOverSSH
Description:
Documentation changes required: (Y/N) N
Added unit tests: (Y/N) N
Attached related issue: (Y/N) Y
Checklist: