File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ module.exports = function(args) {
19
19
help += ' delete: [true|false] # Default is true\n' ;
20
20
help += ' args: <rsync args>\n' ;
21
21
help += ' rsh: <remote shell>\n' ;
22
+ help += ' key: <key>\n' ;
22
23
help += ' verbose: [true|false] # Default is true\n' ;
23
24
help += ' ignore_errors: [true|false] # Default is false\n\n' ;
24
25
help += 'For more help, you can check the docs: ' + color . underline ( 'https://hexo.io/docs/deployment.html' ) ;
@@ -40,7 +41,13 @@ module.exports = function(args) {
40
41
if ( args . port && args . port > 0 && args . port < 65536 ) {
41
42
params . splice ( params . length - 2 , 0 , '-e' ) ;
42
43
if ( args . rsh ) {
43
- params . splice ( params . length - 2 , 0 , `'${ args . rsh } ' -p ${ args . port } ` ) ;
44
+ if ( args . key ) {
45
+ params . splice ( params . length - 2 , 0 , `'${ args . rsh } ' -i ${ args . key } -p ${ args . port } ` ) ;
46
+ } else {
47
+ params . splice ( params . length - 2 , 0 , `'${ args . rsh } ' -p ${ args . port } ` ) ;
48
+ }
49
+ } else if ( args . key ) {
50
+ params . splice ( params . length - 2 , 0 , 'ssh -i ' + args . key + ' -p ' + args . port ) ;
44
51
} else {
45
52
params . splice ( params . length - 2 , 0 , 'ssh -p ' + args . port ) ;
46
53
}
You can’t perform that action at this time.
0 commit comments