Fix deprecated method Buffer.new

This commit is contained in:
Simon Engledew 2020-11-25 12:38:45 +00:00
parent 27520b94c4
commit 582f792089
No known key found for this signature in database
GPG key ID: 84302E7B02FE8BCE
3 changed files with 3 additions and 3 deletions

2
lib/tracer-config.js generated
View file

@ -109,7 +109,7 @@ function concatTracerConfigs(tracerConfigs, config) {
for (const e of Object.entries(env)) {
const key = e[0];
const value = e[1];
const lineBuffer = new Buffer(`${key}=${value}\0`, "utf8");
const lineBuffer = Buffer.from(`${key}=${value}\0`, "utf8");
const sizeBuffer = Buffer.alloc(4);
sizeBuffer.writeInt32LE(lineBuffer.length, 0);
buffer = Buffer.concat([buffer, sizeBuffer, lineBuffer]);