1a27ecdad4
NodeJS implements `child_process.exec` by simply passing the whole command to `child_process.execFile`. See: - https://github.com/nodejs/node/blob/master/lib/child_process.js#L90 - https://github.com/nodejs/node/blob/master/lib/child_process.js#L99 Electron patches `child_process.execFile` to add support for `asar` archives by injecting logic that extracts the required files from the `asar` to a temporary location before delegating the work to the original `child_process.execFile`. In order to decide whether to inject the custom `asar` extracting logic, Electron makes use of a helper function called `splitPath()`. See: - https://github.com/electron/electron/blob/master/lib/common/asar.js#L37 If the first argument of the returned array equals `true`, means that the path is considered to be an `asar` archive, and thus the extraction logic takes place. The problem is that if the command passed to `child_process.execFile` *contains* a path to an asar archive, padded with other commands/arguments, `splitPath()` will consider it to be an `asar` archive, and will try to extract it, throwing a rightfully `Invalid package` error. Fixes: https://github.com/electron/electron/issues/5571 Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com> |
||
---|---|---|
atom | ||
chromium_src | ||
default_app | ||
docs | ||
docs-translations | ||
lib | ||
script | ||
spec | ||
tools | ||
vendor | ||
.gitignore | ||
.gitmodules | ||
.node-version | ||
.travis.yml | ||
appveyor.yml | ||
CODE_OF_CONDUCT.md | ||
common.gypi | ||
CONTRIBUTING-ko.md | ||
CONTRIBUTING.md | ||
electron.gyp | ||
filenames.gypi | ||
ISSUE_TEMPLATE.md | ||
LICENSE | ||
package.json | ||
README-ko.md | ||
README.md | ||
toolchain.gypi |
⚡ Formerly known as Atom Shell ⚡
The Electron framework lets you write cross-platform desktop applications using JavaScript, HTML and CSS. It is based on Node.js and Chromium and is used in the Atom editor.
Follow @ElectronJS on Twitter for important announcements.
This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to atom@github.com.
Downloads
Prebuilt binaries and debug symbols of Electron for Linux, Windows and OS X can be found on the releases page.
You can also use npm
to install prebuilt electron
binaries:
# Install the `electron` command globally in your $PATH
npm install electron-prebuilt -g
# Install as a development dependency
npm install electron-prebuilt --save-dev
Mirrors
Documentation
Guides and the API reference are located in the docs directory. It also contains documents describing how to build and contribute to Electron.
Documentation Translations
- Brazilian Portuguese
- Korean
- Japanese
- Spanish
- Simplified Chinese
- Traditional Chinese
- Turkish
- Ukrainian
- Russian
- French
Quick Start
Clone and run the electron/electron-quick-start
repository to see a minimal Electron app in action.
Community
You can ask questions and interact with the community in the following locations:
electron
category on the Atom forums#atom-shell
channel on FreenodeAtom
channel on Slackelectron-br
(Brazilian Portuguese)electron-kr
(Korean)electron-jp
(Japanese)
Check out awesome-electron for a community maintained list of useful example apps, tools and resources.