Run spawn with path to electron as working directory - #213
Open
muffinista wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On linux, when a fiddle runs, the path to the electron binary will be something like
/home/username/.config/Electron Fiddle/electron-bin/current/chrome-sandboxor something along those lines. But the noteworthy thing here is that the path has a space in it. Whenspawnis passed this as an argument, it thinks/home/username/.config/Electronis the binary, and since that doesn't exist, the command won't run and throws an error such as:There's two obvious ways to try and deal with this. The first option is to explore escaping the path. tbh I tried that, it didn't work, so I moved onto the second (and probably better anyway) option, which is to call
spawnwith the name of the binary as the primary argument, and the path to the binary as thecwdargument.This should fix electron/fiddle#1800 and I think electron/fiddle#1598. Without it, I think it's impossible to run fiddle on Ubuntu. I wrote this PR to fix fiddle so I can file a report on electron.