Skip to content

Commit 394eeb0

Browse files
authored
chore: update changelog script (#6586)
1 parent 36ce569 commit 394eeb0

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

scripts/semconv/changelog-gen.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
const fs = require('fs');
2828
const path = require('path');
2929
const globSync = require('glob').sync;
30-
const {execSync} = require('child_process');
30+
const {execSync, execFileSync} = require('child_process');
3131
const rimraf = require('rimraf');
3232

3333
const TOP = path.resolve(__dirname, '..', '..');
@@ -259,7 +259,7 @@ function semconvChangelogGen(aVer=undefined, bVer=undefined) {
259259

260260
const localDir = path.join(TOP, 'semantic-conventions');
261261
const pj = JSON.parse(fs.readFileSync(path.join(localDir, 'package.json')));
262-
const pkgInfo = JSON.parse(execSync(`npm info -j ${pj.name}`))
262+
const pkgInfo = JSON.parse(execFileSync('npm', ['info', '-j', pj.name]).toString())
263263

264264
let aDir;
265265
if (!aVer) {
@@ -271,7 +271,7 @@ function semconvChangelogGen(aVer=undefined, bVer=undefined) {
271271
const tarballUrl = `https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-${aVer}.tgz`;
272272
fs.mkdirSync(path.dirname(aDir));
273273
const cwd = path.dirname(aDir);
274-
execSync(`curl -sf -o package.tgz ${tarballUrl}`, { cwd });
274+
execFileSync('curl', ['-sf', '-o', 'package.tgz', tarballUrl], { cwd });
275275
execSync(`tar xzf package.tgz`, { cwd });
276276
}
277277

@@ -296,7 +296,7 @@ function semconvChangelogGen(aVer=undefined, bVer=undefined) {
296296
const tarballUrl = `https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-${bVer}.tgz`;
297297
fs.mkdirSync(path.dirname(bDir));
298298
const cwd = path.dirname(bDir);
299-
execSync(`curl -sf -o package.tgz ${tarballUrl}`, { cwd });
299+
execFileSync('curl', ['-sf', '-o', 'package.tgz', tarballUrl], { cwd });
300300
execSync(`tar xzf package.tgz`, { cwd });
301301
}
302302

0 commit comments

Comments
 (0)