a99c193cf2
Currently, when calling `copyFileOut`, the original extension from the file is lost, and a generic `*.tmp` is added instead. This becomes problematic in the scenario where we use `child_process.execFile` on a Windows Batch script that lives inside the `asar` package. Windows relies on the extension being present in order to interpret the script accordingly, which results in the following bug because the operating system doesn't know what do to with this `*.tmp` file: ``` Error: spawn UNKNOWN ``` Steps to reproduce: 1. Create a dummy batch script (test.bat): ``` @echo off echo "Hello world" ``` 2. Create an electron app that attemps to call this script with `child_process.execFile`: ```js var child_process = require('child_process'); var path = require('path'); child_process.execFile(path.join(__dirname, 'test.bat'), function(error, stdout) { if (error) throw error; console.log(stdout); }); ``` 3. Package this small application as an asar archive: ```sh > asar pack mytestapp app.asar ``` 4. Execute the application: ```sh > electron.exe app.asar ``` |
||
---|---|---|
atom | ||
chromium_src | ||
docs | ||
docs-translations | ||
script | ||
spec | ||
tools | ||
vendor | ||
.gitignore | ||
.gitmodules | ||
.travis.yml | ||
atom.gyp | ||
common.gypi | ||
CONTRIBUTING.md | ||
filenames.gypi | ||
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 1.2. 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
Quick Start
Clone and run the atom/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:
Check out awesome-electron for a community maintained list of useful example apps, tools and resources.