Skip to content

Commit

Permalink
fix: remove lodash.once dep (#190)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuceb authored Mar 30, 2021
1 parent c74febb commit 0051191
Show file tree
Hide file tree
Showing 4 changed files with 12,551 additions and 233 deletions.
7 changes: 4 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

// our debug log messages
const debug = require('debug')('xvfb')
const once = require('lodash.once')
const fs = require('fs')
const path = require('path')
const spawn = require('child_process').spawn
Expand Down Expand Up @@ -34,9 +33,11 @@ Xvfb.prototype = {
let didSpawnFail = false
try {
self._spawnProcess(exists, function(e) {
// if we've already errored, noop
if (didSpawnFail) return
didSpawnFail = true
debug('XVFB spawn failed')
debug(e)
didSpawnFail = true
if (cb) cb(e)
})
} catch (e) {
Expand Down Expand Up @@ -153,7 +154,7 @@ Xvfb.prototype = {
_spawnProcess(lockFileExists, onAsyncSpawnError) {
let self = this

const onError = once(onAsyncSpawnError)
const onError = onAsyncSpawnError

let display = self.display()
if (lockFileExists) {
Expand Down
Loading

0 comments on commit 0051191

Please sign in to comment.