Skip to content

Commit

Permalink
fix(otlp-proto-exporter-base): spawn pbjs without node (#3126)
Browse files Browse the repository at this point in the history
Co-authored-by: Gerhard Stöbich <deb2001-github@yahoo.de>
  • Loading branch information
legendecas and Flarna committed Aug 3, 2022
1 parent b1c0062 commit dc67f4e
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ const protos = [

function exec(command, argv) {
return new Promise((resolve, reject) => {
const child = cp.spawn(process.execPath, [command, ...argv], {
const child = cp.spawn(command, argv, {
shell: true,
stdio: ['ignore', 'inherit', 'inherit'],
});
child.on('exit', (code, signal) => {
Expand All @@ -27,15 +28,15 @@ function exec(command, argv) {
return;
}
resolve();
})
});
});
}

function pbts(pbjsOutFile) {
const pbtsPath = path.resolve(__dirname, '../node_modules/.bin/pbts');
const pbtsOptions = [
'-o', path.join(generatedPath, 'root.d.ts'),
]
];
return exec(pbtsPath, [...pbtsOptions, pbjsOutFile]);
}

Expand Down

0 comments on commit dc67f4e

Please sign in to comment.