electron-sudo icon indicating copy to clipboard operation
electron-sudo copied to clipboard

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

Open facekapow opened this issue 8 years ago • 4 comments

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. :+1:

facekapow avatar Dec 18 '16 23:12 facekapow

@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).

malept avatar Dec 31 '16 06:12 malept

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

facekapow avatar Dec 31 '16 14:12 facekapow

tnx, i'll fix it very soon

automation-stack avatar Dec 31 '16 14:12 automation-stack

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

automation-stack avatar Dec 31 '16 14:12 automation-stack