From ae329161779093202e55e415ebc30f44cf3d5364 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sat, 28 Jul 2018 13:51:30 -0600 Subject: [PATCH] not required to create a symlink if it already exists --- usr/share/install-launcher.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr/share/install-launcher.js b/usr/share/install-launcher.js index b6f1332..eec6c56 100644 --- a/usr/share/install-launcher.js +++ b/usr/share/install-launcher.js @@ -237,7 +237,7 @@ Launcher.install = function (things, fn) { //console.log((stdout||'').trim()); var execstr = launcherstr + "enable " + launchername; exec(execstr, things._execOpts, function (err, stdout, stderr) { - err = Launcher._getError(err, !/Created symlink/i.test(stderr||'')); + err = Launcher._getError(err, stderr && !/Created symlink/i.test(stderr) && stderr || ''); if (err) { fn(err); return; } //console.log((stdout||'').trim()); var execstr = launcherstr + "restart " + launchername; @@ -372,7 +372,7 @@ Launcher.uninstall = function (things, fn) { var launcherstr = (vars.userspace ? "" : "sudo ") + "systemctl " + (vars.userspace ? "--user " : ""); var execstr = launcherstr + "disable " + launchername; exec(execstr, things._execOpts, function (err, stdout, stderr) { - err = Launcher._getError(err, !/Removed symlink /i.test(stderr||'') && stderr || ''); + err = Launcher._getError(err, stderr && !/Removed symlink/i.test(stderr) && stderr || ''); if (err) { fn(err); return; } //console.log((stdout||'').trim()); var execstr = launcherstr + "stop " + launchername;