File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -274,11 +274,14 @@ async function extractCertificate(certificateRawData: CertificateRawData) {
274274 const entryText = await readToEnd ( entry ) ;
275275 const lines = entryText . split ( / \r ? \n / ) ;
276276 cert = lines . slice ( 1 , lines . length - 2 ) . join ( "\r\n" ) ;
277+ break ;
277278 } else {
278279 entry . autodrain ( ) ;
279280 }
280281 }
281282
283+ stream . destroy ( ) ;
284+
282285 return cert ;
283286}
284287
Original file line number Diff line number Diff line change @@ -106,7 +106,11 @@ class TestSecuredServiceLocator extends RavenServerLocator {
106106 }
107107
108108 public getServerCertificatePath ( ) {
109- return path . resolve ( process . env [ TestSecuredServiceLocator . ENV_SERVER_CERTIFICATE_PATH ] ) ;
109+ const certPath = process . env [ TestSecuredServiceLocator . ENV_SERVER_CERTIFICATE_PATH ] ;
110+ if ( ! certPath ) {
111+ throwError ( "InvalidArgumentException" , TestSecuredServiceLocator . ENV_SERVER_CERTIFICATE_PATH + " env variable is missing" ) ;
112+ }
113+ return path . resolve ( certPath ) ;
110114 }
111115
112116 public getClientAuthOptions ( ) : IAuthOptions {
You can’t perform that action at this time.
0 commit comments