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 ) {
96
96
fontface . writeCSSFiles ( ) ;
97
97
} catch ( e ) {
98
98
console . log ( "GlyphHangerFontFace Error: " , e ) ;
99
- process . exit ( 1 ) ;
99
+ process . exitCode = 1 ;
100
100
}
101
101
102
102
try {
@@ -105,17 +105,15 @@ if( argv.version ) {
105
105
}
106
106
} catch ( e ) {
107
107
console . log ( "GlyphHangerSubset Error: " , e ) ;
108
- process . exit ( 1 ) ;
108
+ process . exitCode = 1 ;
109
109
}
110
110
111
111
try {
112
112
fontface . output ( ) ;
113
113
} catch ( e ) {
114
114
console . log ( "GlyphHangerFontFace Error: " , e ) ;
115
- process . exit ( 1 ) ;
115
+ process . exitCode = 1 ;
116
116
}
117
-
118
- process . exit ( ) ;
119
117
} ) ( ) ;
120
118
} else { // not using URLs
121
119
if ( argv . subset ) {
Original file line number Diff line number Diff line change @@ -166,11 +166,14 @@ class GlyphHangerEnvironment {
166
166
}
167
167
168
168
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
+ }
173
175
}
176
+
174
177
return this . _env ;
175
178
}
176
179
You can’t perform that action at this time.
0 commit comments