From 0fc0c7081e2a88224b08e52f71e0b5df8106e35a Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Wed, 22 May 2024 12:16:41 -0700 Subject: [PATCH] =?UTF-8?q?[Fix]=20readFileSync=E2=80=98s=20object=20optio?= =?UTF-8?q?n=20was=20added=20in=20node=200.10;=20the=20string=20form=20for?= =?UTF-8?q?=20encoding=20works=20everywhere?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- coffee/lib/read-pipes.coffee | 2 +- js/lib/read-pipes.js | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/coffee/lib/read-pipes.coffee b/coffee/lib/read-pipes.coffee index 60e62ff..47d24e1 100644 --- a/coffee/lib/read-pipes.coffee +++ b/coffee/lib/read-pipes.coffee @@ -28,7 +28,7 @@ module.exports = (dir, max_wait) -> result = {} for pipe in ['stdout', 'stderr', 'status'] - result[pipe] = fs.readFileSync dir + '/' + pipe, encoding: 'utf-8' + result[pipe] = fs.readFileSync dir + '/' + pipe, 'utf-8' read = true fs.unlinkSync dir + '/' + pipe diff --git a/js/lib/read-pipes.js b/js/lib/read-pipes.js index b239d4f..a3e2cc8 100644 --- a/js/lib/read-pipes.js +++ b/js/lib/read-pipes.js @@ -28,9 +28,7 @@ ref = ['stdout', 'stderr', 'status']; for (i = 0, len = ref.length; i < len; i++) { pipe = ref[i]; - result[pipe] = fs.readFileSync(dir + '/' + pipe, { - encoding: 'utf-8' - }); + result[pipe] = fs.readFileSync(dir + '/' + pipe, 'utf-8'); read = true; fs.unlinkSync(dir + '/' + pipe); }