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 <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
  • Loading branch information
zcbenz authored Dec 5, 2023
1 parent 1e31a01 commit 4957994
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 4957994

Please sign in to comment.