Skip to content

Commit

Permalink
lib: replace string concatenation with template
Browse files Browse the repository at this point in the history
PR-URL: nodejs#16920
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
  • Loading branch information
chandrams authored and fhinkel committed Nov 11, 2017
1 parent 5bd8206 commit 79f805c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/child_process.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 79f805c

Please sign in to comment.