From 4a1d6ad759f78d8c0d53d744052f1d9cc8c31488 Mon Sep 17 00:00:00 2001 From: Landon Abney Date: Thu, 23 Mar 2017 09:48:51 -0700 Subject: [PATCH] Change how encoding is specified Apparently on macOS Ruby has different command line arguments from all the other OS's, thankfully it seems the --external-encoding and --internal-encoding options are the same, and the -Eutf-8 that was in use before is equivalent to setting both of those anyway. --- lib/main.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/main.js b/lib/main.js index 3604d84..43b4cb4 100644 --- a/lib/main.js +++ b/lib/main.js @@ -36,7 +36,13 @@ export default { return []; } - const execArgs = ['-wc', '-Eutf-8']; + const execArgs = [ + '-c', // Check syntax only, no execution + '-w', // Turns on warnings + // Set the encoding to UTF-8 + '--external-encoding=utf-8', + '--internal-encoding=utf-8', + ]; const execOpts = { stdin: fileText, stream: 'stderr',