From 04a56f474d9953fb6b66382d1ea05cf04f0467e8 Mon Sep 17 00:00:00 2001 From: Taylor Wood Date: Tue, 27 Dec 2016 17:12:58 -0700 Subject: [PATCH 1/3] added a fix so that shell and shellArgs can be callbacks --- lib/tty.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/tty.js b/lib/tty.js index 78849eb8..0e4e041c 100644 --- a/lib/tty.js +++ b/lib/tty.js @@ -632,6 +632,7 @@ var slice = Array.prototype.slice; function sanitize(file) { if (!file) return ''; + if (typeof file !== 'string') return file; file = file.split(' ')[0] || ''; return path.basename(file) || ''; } From d5fdce37f7c850e10488c13b5a6fad39c0dfbd26 Mon Sep 17 00:00:00 2001 From: Taylor Wood Date: Tue, 27 Dec 2016 17:16:44 -0700 Subject: [PATCH 2/3] updated config to check for function --- lib/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/config.js b/lib/config.js index cdc1bc35..58f01251 100644 --- a/lib/config.js +++ b/lib/config.js @@ -102,7 +102,7 @@ function checkConfig(conf) { conf.hostname; // '0.0.0.0' // shell, process name - if (conf.shell && ~conf.shell.indexOf('/')) { + if (conf.shell && && typeof conf.shell !== 'function' && ~conf.shell.indexOf('/')) { conf.shell = path.resolve(conf.dir, conf.shell); } conf.shell = conf.shell || process.env.SHELL || 'sh'; From 6f674998ec7babdbbb0a5088eb09492ecf3d1353 Mon Sep 17 00:00:00 2001 From: Taylor Wood Date: Tue, 27 Dec 2016 17:17:48 -0700 Subject: [PATCH 3/3] removed extra logical operator --- lib/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/config.js b/lib/config.js index 58f01251..6930949e 100644 --- a/lib/config.js +++ b/lib/config.js @@ -102,7 +102,7 @@ function checkConfig(conf) { conf.hostname; // '0.0.0.0' // shell, process name - if (conf.shell && && typeof conf.shell !== 'function' && ~conf.shell.indexOf('/')) { + if (conf.shell && typeof conf.shell !== 'function' && ~conf.shell.indexOf('/')) { conf.shell = path.resolve(conf.dir, conf.shell); } conf.shell = conf.shell || process.env.SHELL || 'sh';