From 7aaf913166cb28852081176da31fa02d5a341129 Mon Sep 17 00:00:00 2001 From: Bobby Wibowo Date: Thu, 14 Nov 2019 14:46:49 +0700 Subject: [PATCH] Actually parse error messages of du & df to String --- controllers/utilsController.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/controllers/utilsController.js b/controllers/utilsController.js index a7547e6..c3506b0 100644 --- a/controllers/utilsController.js +++ b/controllers/utilsController.js @@ -623,7 +623,7 @@ self.stats = async (req, res, next) => { }) const stderr = [] - proc.stderr.on('data', data => stderr.push(data)) + proc.stderr.on('data', data => stderr.push(String(data))) proc.on('exit', code => { if (code !== 0) return reject(stderr) @@ -656,7 +656,7 @@ self.stats = async (req, res, next) => { }) const stderr = [] - proc.stderr.on('data', data => stderr.push(data)) + proc.stderr.on('data', data => stderr.push(String(data))) proc.on('exit', code => { if (code !== 0) return reject(stderr) @@ -695,7 +695,7 @@ self.stats = async (req, res, next) => { }) const stderr = [] - proc.stderr.on('data', data => stderr.push(data)) + proc.stderr.on('data', data => stderr.push(String(data))) proc.on('exit', code => { if (code !== 0) return reject(stderr)