@@ -764,7 +764,7 @@ function getKubectlEnvironment(options, httpsProxyUrl, bypassProxyHosts) {
764764 env [ 'PROGRAMDATA' ] = process . env . PROGRAMDATA ;
765765 }
766766
767- if ( options && options . extraEnvironmentVariables ) {
767+ if ( options ? .extraEnvironmentVariables ) {
768768 const extraEnvironmentVariables =
769769 osUtils . removeProtectedEnvironmentVariables ( options . extraEnvironmentVariables ) ;
770770 env = Object . assign ( env , extraEnvironmentVariables ) ;
@@ -774,10 +774,7 @@ function getKubectlEnvironment(options, httpsProxyUrl, bypassProxyHosts) {
774774
775775function getOperatorImageTag ( operatorDeployment ) {
776776 let imageTag ;
777- if ( operatorDeployment . spec
778- && operatorDeployment . spec . template
779- && operatorDeployment . spec . template . spec
780- && operatorDeployment . spec . template . spec . containers ) {
777+ if ( operatorDeployment . spec ?. template ?. spec ?. containers ) {
781778 const containers = operatorDeployment . spec . template . spec . containers ;
782779
783780 for ( const container of containers ) {
@@ -886,7 +883,7 @@ async function isVerrazzanoInstalled(kubectlExe, options) {
886883 result . name = vzObject . metadata ?. name ;
887884
888885 let statusVersion = vzObject . status ?. version ;
889- if ( statusVersion && statusVersion . startsWith ( 'v' ) ) {
886+ if ( statusVersion ? .startsWith ( 'v' ) ) {
890887 statusVersion = statusVersion . slice ( 1 ) ;
891888 }
892889 result . version = statusVersion ;
0 commit comments