This repository was archived by the owner on Aug 21, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -139,7 +139,11 @@ module.exports = (options) => {
139139 pagesDomains . every ( hasValidCertificate ) ;
140140
141141 if ( needsNoRenewal ) {
142- return Promise . reject ( `All domains (${ options . domain . join ( ', ' ) } ) have a valid certificate (expiration in more than ${ EXPIRATION_IN_DAYS } days)` ) ;
142+
143+ const error = new Error ( `All domains (${ options . domain . join ( ', ' ) } ) have a valid certificate (expiration in more than ${ EXPIRATION_IN_DAYS } days)` ) ;
144+ error . exitCode = 0 ;
145+
146+ return Promise . reject ( error ) ;
143147 }
144148
145149 // promises to create the new domains
Original file line number Diff line number Diff line change @@ -13,7 +13,14 @@ module.exports = (args) => {
1313 console . log ( `This certificate expires on ${ certs . notAfter } . You will need to run gitlab-le again at some time before this date.` ) ;
1414 }
1515 } ) . catch ( err => {
16+
17+ if ( err . exitCode !== undefined ) {
18+ console . log ( err . detail || err . message || err ) ;
19+ process . exit ( err . exitCode ) ;
20+ }
21+
1622 console . error ( err . detail || err . message || err ) ;
23+
1724 process . exit ( 1 ) ;
1825 } ) ;
1926} ;
You can’t perform that action at this time.
0 commit comments