Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove path import and fix error when using .init #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JellyO1
Copy link

@JellyO1 JellyO1 commented Nov 10, 2023

Importing the path module isn't compatible with the latest security best practices. Fixes #18

Importing the path module isn't compatible with the latest security best
practices.
@@ -46,7 +45,7 @@ export const preloadBindings = function (ipcRenderer, process) {
// Exposing values of [Node's] process for use in the client-side options
environment: process.env.NODE_ENV,
platform: process.platform,
resourcesPath: path.join(process.resourcesPath, "..")
resourcesPath: process.resourcesPath !== undefined ? process.resourcesPath + `${process.platform === "win32" ? "\\.." : "/.."}` : undefined
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a mac to test this.

Copy link

sonarcloud bot commented Nov 10, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Getting Error: module not found: path when call preloadBindings()
1 participant