Delay error that Xvfb is not available so main code can handle it instead.

develop
Icedream Jenkins 2015-11-02 12:20:40 +01:00
parent f650c3296b
commit b6a70ebdc5
1 changed files with 5 additions and 1 deletions

View File

@ -4,11 +4,15 @@ config = require("../config")
services = require("../services")
require_bin = require("../require_bin")
require_bin "Xvfb"
xvfbPath = require_bin "Xvfb", false
module.exports = class XvfbService extends services.Service
constructor: -> super "Xvfb",
start: (cb) ->
if not xvfbPath?
cb? new Error "Xvfb is not available."
return
if @instance
cb? null, @instance
return