This repository was archived by the owner on Apr 4, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
eclipse-che-theia-remote-impl-che-server/src/node
eclipse-che-theia-remote-impl-k8s/src/node Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -31,8 +31,10 @@ export class CheServerCertificateServiceImpl implements CertificateService {
3131 const publicCertificates = await fs . readdir ( PUBLIC_CRT_PATH ) ;
3232 for ( const publicCertificate of publicCertificates ) {
3333 const certPath = path . join ( PUBLIC_CRT_PATH , publicCertificate ) ;
34- const content = await fs . readFile ( certPath ) ;
35- certificateAuthority . push ( content ) ;
34+ if ( ( await fs . pathExists ( certPath ) ) && ( await fs . stat ( certPath ) ) . isFile ( ) ) {
35+ const content = await fs . readFile ( certPath ) ;
36+ certificateAuthority . push ( content ) ;
37+ }
3638 }
3739 }
3840
Original file line number Diff line number Diff line change @@ -31,8 +31,10 @@ export class K8sCertificateServiceImpl implements CertificateService {
3131 const publicCertificates = await fs . readdir ( PUBLIC_CRT_PATH ) ;
3232 for ( const publicCertificate of publicCertificates ) {
3333 const certPath = path . join ( PUBLIC_CRT_PATH , publicCertificate ) ;
34- const content = await fs . readFile ( certPath ) ;
35- certificateAuthority . push ( content ) ;
34+ if ( ( await fs . pathExists ( certPath ) ) && ( await fs . stat ( certPath ) ) . isFile ( ) ) {
35+ const content = await fs . readFile ( certPath ) ;
36+ certificateAuthority . push ( content ) ;
37+ }
3638 }
3739 }
3840
You can’t perform that action at this time.
0 commit comments