We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 22fa042 + 990f1bf commit f0fc564Copy full SHA for f0fc564
scp.js
@@ -14,7 +14,7 @@ scp.send = function (options, cb) {
14
'scp',
15
'-r',
16
options.file,
17
- options.host + ':' + options.path,
+ (options.user == undefined ? '' : options.user+'@') + options.host + ':' + options.path,
18
];
19
exec(command.join(' '), function (err, stdout, stderr) {
20
if (cb) {
@@ -32,7 +32,7 @@ scp.get = function (options, cb) {
32
var command = [
33
34
35
- options.host + ':' + options.file,
+ (options.user == undefined ? '' : options.user+'@') + options.host + ':' + options.file,
36
options.path
37
38
0 commit comments