From ee9bd9c0fc1f8fe2d0b446567a4695ce5de0ec1e Mon Sep 17 00:00:00 2001 From: Carl Kittelberger Date: Mon, 2 Nov 2015 12:44:12 +0100 Subject: [PATCH] Delay Blackbox availability handling. Allow the main code to handle this case instead. --- services/blackbox.iced | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/services/blackbox.iced b/services/blackbox.iced index e73fdb4..a645200 100644 --- a/services/blackbox.iced +++ b/services/blackbox.iced @@ -4,7 +4,7 @@ services = require("../services") StreamSplitter = require("stream-splitter") require_bin = require("../require_bin") -blackboxBinPath = require_bin "blackbox" +blackboxBinPath = require_bin "blackbox", false module.exports = class BlackBoxService extends services.Service dependencies: [ @@ -12,6 +12,10 @@ module.exports = class BlackBoxService extends services.Service ] constructor: -> super "BlackBox", start: (cb) -> + if not blackboxBinPath? + cb? new Error "Blackbox not available." + return + if @process cb? null, @process return