Skip to content

Commit

Permalink
test: resolve path of embedtest binary correctly
Browse files Browse the repository at this point in the history
PR-URL: #50276
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
  • Loading branch information
zcbenz authored and RafaelGSS committed Dec 15, 2023
1 parent c3abdc5 commit 7f5291d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/embedding/test-embedding.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ tmpdir.refresh();
common.allowGlobals(global.require);
common.allowGlobals(global.embedVars);

function resolveBuiltBinary(bin) {
let binary = `out/${common.buildType}/${bin}`;
function resolveBuiltBinary(binary) {
if (common.isWindows) {
binary += '.exe';
}
return path.resolve(__dirname, '..', '..', binary);
return path.join(path.dirname(process.execPath), binary);
}

const binary = resolveBuiltBinary('embedtest');
Expand Down

0 comments on commit 7f5291d

Please sign in to comment.