File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ export class Cp {
36
36
const writerStream = fs . createWriteStream ( tmpFileName ) ;
37
37
const errStream = new WritableStreamBuffer ( ) ;
38
38
return new Promise < void > ( ( resolve , reject ) => {
39
- this . execInstance
39
+ const conn = await this . execInstance
40
40
. exec (
41
41
namespace ,
42
42
podName ,
@@ -67,6 +67,9 @@ export class Cp {
67
67
} ,
68
68
)
69
69
. catch ( reject ) ;
70
+ conn . onclose = ( event ) => {
71
+ resolve ( ) ;
72
+ } ;
70
73
} ) ;
71
74
}
72
75
@@ -92,7 +95,7 @@ export class Cp {
92
95
const readStream = fs . createReadStream ( tmpFileName ) ;
93
96
const errStream = new WritableStreamBuffer ( ) ;
94
97
return new Promise < void > ( ( resolve , reject ) => {
95
- this . execInstance
98
+ const conn = await this . execInstance
96
99
. exec (
97
100
namespace ,
98
101
podName ,
@@ -116,6 +119,9 @@ export class Cp {
116
119
} ,
117
120
)
118
121
. catch ( reject ) ;
122
+ conn . onclose = ( event ) => {
123
+ resolve ( ) ;
124
+ } ;
119
125
} ) ;
120
126
}
121
127
}
You can’t perform that action at this time.
0 commit comments