Skip to content

Commit

Permalink
chore: linux node load from exec dir for new distribution engg
Browse files Browse the repository at this point in the history
  • Loading branch information
abose committed Feb 14, 2024
1 parent 1427952 commit 05da456
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/node-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,11 @@ function nodeLoader() {

window.__TAURI__.path.resolveResource("src-node/index.js")
.then(async nodeSrcPath=>{
if(Phoenix.platform === "linux") {
// in linux installed distributions, src-node is present in the same dir as the executable.
const cliArgs = await window.__TAURI__.invoke('_get_commandline_args');
nodeSrcPath = `${window.path.dirname(cliArgs[0])}/src-node`;
}
// node is designed such that it is not required at boot time to lower startup time.
// Keep this so to increase boot speed.
const inspectPort = Phoenix.isTestWindow ? getRandomNumber(5000, 50000) : 9229;
Expand Down

0 comments on commit 05da456

Please sign in to comment.