From b6a70ebdc5af5c6a48220fa5c45a03ba4d798940 Mon Sep 17 00:00:00 2001 From: Icedream Jenkins Date: Mon, 2 Nov 2015 12:20:40 +0100 Subject: [PATCH] Delay error that Xvfb is not available so main code can handle it instead. --- services/xvfb.iced | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/services/xvfb.iced b/services/xvfb.iced index b3f1027..4edc696 100644 --- a/services/xvfb.iced +++ b/services/xvfb.iced @@ -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