8000 Fix Linux platform (specifically getBinary(), exec(), and spawn()) by facekapow · Pull Request #41 · automation-stack/electron-sudo · GitHub
[go: up one dir, main page]

Skip to content

Conversation

facekapow
Copy link
Contributor

There was a bug in the SudoerLinux.getBinary() function which replaced the path with an object, causing [object Object] to appear as the binary path.

There was another bug in SudoerLinux.exec() and SudoerLinux.spawn() which prevented the DISPLAY variable from being set correctly if options.env isn't provided.

A (good) side effect of the fix for the exec/spawn bug is that both functions now use env just like the native Node.js equivalents (Node passes your current process.env if you don't specify the env option).

Tested and working on my machine. 👍

facekapow and others added 2 commits December 18, 2016 18:14
The stat utility function returns null (instead of throwing an error)
when a path is not found, so handle that case.
@malept
Copy link
malept commented Dec 31, 2016

@facekapow I found a further bug in the Linux support, which only shows up if you don't have gksudo installed. If you fast-forward merge my commit, it will fix that (the explanation of the bug is in the commit message).

@facekapow
Copy link
Contributor Author

@malept Nice find, thanks! I've merged it in.

@automation-stack
Copy link
Owner

tnx, i'll fix it very soon

@automation-stack
Copy link
Owner

Now code is being refactored and i will add you fix in new code

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.

3 participants

0