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

Fix Linux platform (specifically getBinary(), exec(), and spawn()) #41

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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