You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
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 anObservable.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 (stat
ing 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.The text was updated successfully, but these errors were encountered: