File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ function SSH(context) {
25
25
26
26
var fiber = Fiber . current ;
27
27
28
+ var hasFailed = false ;
29
+
28
30
this . _connection = new Connection ( ) ;
29
31
30
32
this . _connection . on ( 'keyboard-interactive' , function next ( name , instructions ,
@@ -33,7 +35,7 @@ function SSH(context) {
33
35
34
36
var currentPrompt = prompts [ answers . length ] ;
35
37
36
- if ( answers . length < prompts . length ) {
38
+ if ( answers . length < prompts . length && ! hasFailed ) {
37
39
new Fiber ( function ( ) {
38
40
var answer = self . prompt ( currentPrompt . prompt , { hidden : ! currentPrompt . echo } ) ;
39
41
answers . push ( answer ) ;
@@ -50,6 +52,7 @@ function SSH(context) {
50
52
} ) ;
51
53
52
54
this . _connection . on ( 'error' , function ( err ) {
55
+ hasFailed = true ;
53
56
return fiber . throwInto ( err ) ;
54
57
} ) ;
55
58
You can’t perform that action at this time.
0 commit comments