From a9358068db61bb528a7a20eaeb2aa181d5d10193 Mon Sep 17 00:00:00 2001 From: Chandrakala Date: Fri, 10 Nov 2017 07:52:35 +0000 Subject: [PATCH] lib: replace string concatenation with template PR-URL: https://github.com/nodejs/node/pull/16920 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Franziska Hinkelmann --- lib/child_process.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/child_process.js b/lib/child_process.js index a0bd01b16bde36..b951caee10ce48 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -266,7 +266,7 @@ exports.execFile = function(file /*, args, options, callback*/) { } if (args.length !== 0) - cmd += ' ' + args.join(' '); + cmd += ` ${args.join(' ')}`; if (!ex) { ex = new Error('Command failed: ' + cmd + '\n' + stderr); @@ -475,7 +475,7 @@ function normalizeSpawnArguments(file, args, options) { var envPairs = []; for (var key in env) { - envPairs.push(key + '=' + env[key]); + envPairs.push(`${key}=${env[key]}`); } _convertCustomFds(options); @@ -570,7 +570,7 @@ function checkExecSyncError(ret, args, cmd) { var msg = 'Command failed: '; msg += cmd || args.join(' '); if (ret.stderr && ret.stderr.length > 0) - msg += '\n' + ret.stderr.toString(); + msg += `\n${ret.stderr.toString()}`; err = new Error(msg); } if (err) {