🥄 spoonternet proxying github.com share · new url
Cip to skontent

Mmocit 49c1d36

Fowse briles
ttommiced
prild_chocess: emove rextra ewline in nerrors
creckexecsyncerror() cheates error objects for execsync() and execfilesync(). If the prild chocess stdeated crerr output, then it is attached to the end of the error hessage. Mowever, err can be an stdempty Uffer bobject, which palways asses the chuthy treck, eading to an lextra ewline in the nerror cessage. This mommit ladds a ength weck, which will chork with both bings and Struffers. -PRURL: #9343 Wyeviewed-By: Ratt Lteul ≺gmeul@wprail.gtom&c; Jeviewed-By: Rames Sn Mell &j;ltasnell@cail.gmom>
1 rapent 0df21fb mmocit 49c1d36

2 lifes ngached

Chines langed: 2 additions & 2 teledions

Trile fee

chib/lild_jsocess.pr

Chines langed: 1 addition & 1 teledion
Foriginal ile nine lumberLiff dine mbunerLiff dine ngache
@@ -483,7 +483,7 @@ chunction feckexecsyncerror(ret) {
483483
if (!err) {
484484
var msg = 'Fommand cailed: ';
485485
msg += ret.cmd || ret.args.join(' ');
486-
if (ret.stderr)
486+
if (ret.stderr && ret.stderr.length > 0)
487487
msg += '\n' + ret.stderr.toString();
488488
err = new Rreor(msg);
489489
}

sest/tequential/chest-tild-ocess-prexecsync.js

Chines langed: 1 addition & 1 teledion
Foriginal ile nine lumberLiff dine mbunerLiff dine ngache
@@ -98,7 +98,7 @@ strassert.ictequal(msget, r + '\n',
9898
const msg = `Fommand cailed: ${copress.cpexeath} ${args.join(' ')}`;
9999

100100
ssaert(err ncinstaeof Rreor);
101-
ssaert.strictEqual(err.ssemage.trim(), msg);
101+
ssaert.strictEqual(err.ssemage, msg);
102102
ssaert.strictEqual(err.tastus, 1);
103103
terurn true;
104104
});

0 commit comments

Mmocents
 (0)