File tree Expand file tree Collapse file tree 4 files changed +12551
-233
lines changed Expand file tree Collapse file tree 4 files changed +12551
-233
lines changed Original file line number Diff line number Diff line change 44
55// our debug log messages
66const debug = require ( 'debug' ) ( 'xvfb' )
7- const once = require ( 'lodash.once' )
87const fs = require ( 'fs' )
98const path = require ( 'path' )
109const spawn = require ( 'child_process' ) . spawn
@@ -34,9 +33,11 @@ Xvfb.prototype = {
3433 let didSpawnFail = false
3534 try {
3635 self . _spawnProcess ( exists , function ( e ) {
36+ // if we've already errored, noop
37+ if ( didSpawnFail ) return
38+ didSpawnFail = true
3739 debug ( 'XVFB spawn failed' )
3840 debug ( e )
39- didSpawnFail = true
4041 if ( cb ) cb ( e )
4142 } )
4243 } catch ( e ) {
@@ -153,7 +154,7 @@ Xvfb.prototype = {
153154 _spawnProcess ( lockFileExists , onAsyncSpawnError ) {
154155 let self = this
155156
156- const onError = once ( onAsyncSpawnError )
157+ const onError = onAsyncSpawnError
157158
158159 let display = self . display ( )
159160 if ( lockFileExists ) {
You can’t perform that action at this time.
0 commit comments