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

Why all this "find executable in PATH" goosery on non-Win32? #19

Open
bengotow opened this issue Oct 8, 2017 · 1 comment
Open

Why all this "find executable in PATH" goosery on non-Win32? #19

bengotow opened this issue Oct 8, 2017 · 1 comment

Comments

@bengotow
Copy link

bengotow commented Oct 8, 2017

Hey! I'm trying to debug an issue I'm having with electron-spellcheck. Essentially on both my Debian and Fedora test machines, this line is failing (https://github.com/electron-userland/electron-spellchecker/blob/master/src/spell-check-handler.js#L590). To make things worse, the following catch yields an Observable.of(null), which then causes the next line to throw an exception because it expects strings. (Cannot call split on "null")

Aaanyway - that brought me here to spawn-rx, which looks great. I'm trying to understand why await spawn('locale', ['-a']) would fail in the first place, since on both these machines it works on the Terminal.

It seems like spawn-rx is calling runDownPath on non-Win32 platforms (https://github.com/paulcbetts/spawn-rx/blob/master/src/index.ts#L96), which seems to go through a lot of trouble trying to find an executable on the PATH (stating around, etc.) and introduces a handful of places that might be the source of my headache. This seems like overkill, since the system would do this automatically if you just tried to run the command.

Haven't found the root cause yet, so this is mostly an observation—I think that call to runDownPath could probably be removed and only used on Windows? Will file appropriate issues when I figure out what's going.

@bengotow bengotow changed the title Why all this "find executable in PATH" business on non-Win32? Why all this "find executable in PATH" goosery on non-Win32? Oct 8, 2017
@bengotow
Copy link
Author

bengotow commented Oct 8, 2017

Hah—just noticed the comment referring to this as goosery. Updating this issue accordingly. 🦆

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

No branches or pull requests

1 participant