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 and richardlau committed Mar 25, 2024
1 parent c705b73 commit a1feae2
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 a1feae2

Please sign in to comment.