Skip to content

Commit 585fd3c

Browse files
inherit system PATH (#70)
* inherit system PATH * fix testbench compat issue * Fix styling --------- Co-authored-by: gwleuverink <17123491+gwleuverink@users.noreply.github.com> Co-authored-by: Peter Bishop <9081809+PeteBishwhip@users.noreply.github.com>
1 parent 379fb77 commit 585fd3c

File tree

3 files changed

+286
-0
lines changed

3 files changed

+286
-0
lines changed

package-lock.json

Lines changed: 277 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"dependencies": {
3+
"fix-path": "^5.0.0"
4+
}
5+
}

resources/electron/src/main/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ import {app} from 'electron'
22
import NativePHP from '#plugin'
33
import path from 'path'
44

5+
// Inherit User's PATH in Process & ChildProcess
6+
import fixPath from 'fix-path';
7+
fixPath();
8+
59
const buildPath = path.resolve(import.meta.dirname, import.meta.env.MAIN_VITE_NATIVEPHP_BUILD_PATH);
610
const defaultIcon = path.join(buildPath, 'icon.png')
711
const certificate = path.join(buildPath, 'cacert.pem')

0 commit comments

Comments
 (0)