Skip to content

Commit a1feae2

Browse files
zcbenzrichardlau
authored andcommitted
test: resolve path of embedtest binary correctly
PR-URL: #50276 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
1 parent c705b73 commit a1feae2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

‎test/embedding/test-embedding.js‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,11 @@ tmpdir.refresh();
1414
common.allowGlobals(global.require);
1515
common.allowGlobals(global.embedVars);
1616

17-
functionresolveBuiltBinary(bin){
18-
letbinary=`out/${common.buildType}/${bin}`;
17+
functionresolveBuiltBinary(binary){
1918
if(common.isWindows){
2019
binary+='.exe';
2120
}
22-
returnpath.resolve(__dirname,'..','..',binary);
21+
returnpath.join(path.dirname(process.execPath),binary);
2322
}
2423

2524
constbinary=resolveBuiltBinary('embedtest');

0 commit comments

Comments
(0)