From e320f77429893aeacd2a1cda9d06486403e04f15 Mon Sep 17 00:00:00 2001 From: anseki Date: Sat, 6 Feb 2016 11:42:37 +0900 Subject: [PATCH] Fix #30 --- lib/readline-sync.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/readline-sync.js b/lib/readline-sync.js index cc54f25..587e81f 100644 --- a/lib/readline-sync.js +++ b/lib/readline-sync.js @@ -266,7 +266,7 @@ function readlineExt(options) { try { res.input = childProc.execFileSync(extHostPath, hostArgs, execOptions); } catch (e) { // non-zero exit code - extMessage = e.stderr.trim(); + extMessage = e.stderr ? (e.stderr + '').trim() : ''; res.error = new Error(DEFAULT_ERR_MSG + (extMessage ? '\n' + extMessage : '')); res.error.method = 'execFileSync'; res.error.program = extHostPath;