This repository was archived by the owner on Mar 9, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed
Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ if( argv.version ) {
9696 fontface . writeCSSFiles ( ) ;
9797 } catch ( e ) {
9898 console . log ( "GlyphHangerFontFace Error: " , e ) ;
99- process . exit ( 1 ) ;
99+ process . exitCode = 1 ;
100100 }
101101
102102 try {
@@ -105,17 +105,15 @@ if( argv.version ) {
105105 }
106106 } catch ( e ) {
107107 console . log ( "GlyphHangerSubset Error: " , e ) ;
108- process . exit ( 1 ) ;
108+ process . exitCode = 1 ;
109109 }
110110
111111 try {
112112 fontface . output ( ) ;
113113 } catch ( e ) {
114114 console . log ( "GlyphHangerFontFace Error: " , e ) ;
115- process . exit ( 1 ) ;
115+ process . exitCode = 1 ;
116116 }
117-
118- process . exit ( ) ;
119117 } ) ( ) ;
120118} else { // not using URLs
121119 if ( argv . subset ) {
Original file line number Diff line number Diff line change @@ -166,11 +166,14 @@ class GlyphHangerEnvironment {
166166 }
167167
168168 get env ( ) {
169- if ( this . envStr === "jsdom" ) {
170- this . _env = new JSDOMEnvironment ( ) ;
171- } else {
172- this . _env = new PuppeteerEnvironment ( ) ;
169+ if ( ! this . _env ) {
170+ if ( this . envStr === "jsdom" ) {
171+ this . _env = new JSDOMEnvironment ( ) ;
172+ } else {
173+ this . _env = new PuppeteerEnvironment ( ) ;
174+ }
173175 }
176+
174177 return this . _env ;
175178 }
176179
You can’t perform that action at this time.
0 commit comments