diff --git a/lib/config.js b/lib/config.js index cdc1bc35..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 && ~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'; 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) || ''; }