From 18316b805e773207fad7311751259a3f5f2eaeb2 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Thu, 28 Jun 2018 03:12:13 -0600 Subject: [PATCH] bugfixes windows start, node daemon error --- usr/share/install-launcher.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/usr/share/install-launcher.js b/usr/share/install-launcher.js index 5b08e59..1fac0a1 100644 --- a/usr/share/install-launcher.js +++ b/usr/share/install-launcher.js @@ -95,9 +95,12 @@ Launcher.install = function (things, fn) { killed += 1; }); + // Two things: + // 1) wait to see if the process dies + // 2) wait to give time for the socket to cennect setTimeout(function () { - if (fn) { fn(null); return; } - }, 1 * 1000); + if (fn) { fn(err); return; } + }, 1.25 * 1000); return; } , 'launchctl': function () { @@ -134,7 +137,9 @@ Launcher.install = function (things, fn) { if (err) { fn(err); return; } //console.log((stdout||'').trim()); //console.log('load worked?'); - fn(null); + setTimeout(function () { + fn(null); + }, 1.25 * 1000); }); }); } catch(e) { @@ -216,8 +221,8 @@ Launcher.install = function (things, fn) { exec(cmd, things._execOpts, function (err, stdout, stderr) { err = getError(err, stderr); if (err) { fn(err); return; } - //console.log((stdout||'').trim()); - fn(null); + // need to start it for the first time ourselves + launchers.node(); }); } };