electron/spec
Juan Cruz Viotti 1a27ecdad4 Override child_process.execFile asar patch for child_process.exec
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>
2016-05-19 17:19:36 -04:00
..
fixtures Merge pull request #5574 from electron/devtools-extension-test 2016-05-18 01:46:44 +00:00
static allow protocol module initialization before app ready. 2016-05-08 01:36:34 +05:30
api-app-spec.js Merge branch '1-0-release' 2016-05-11 15:14:56 +09:00
api-auto-updater-spec.js wrap conditional, because return can only be used in a function 2016-03-30 17:00:31 -07:00
api-browser-window-spec.js Remove semicolon 2016-05-17 16:42:37 -07:00
api-clipboard-spec.js autoformat more files 2016-03-30 17:00:31 -07:00
api-crash-reporter-spec.js Suppress crashReporter test on x64 Windows for now 2016-05-13 11:12:01 +09:00
api-debugger-spec.js avoid using eslint comment exceptions 2016-03-30 17:00:34 -07:00
api-deprecations-spec.js Test no handler via call to deprecate.log 2016-05-06 10:12:55 -07:00
api-desktop-capturer-spec.js Fix specs on Windows when running without desktop session 2016-04-30 21:03:22 +09:00
api-ipc-spec.js Fix exception when refreshing specs window 2016-05-09 20:08:50 +09:00
api-menu-spec.js autoformat more files 2016-03-30 17:00:31 -07:00
api-native-image-spec.js standardize more 2016-03-30 17:00:32 -07:00
api-protocol-spec.js spec: protocol.registerStandardSchemes does not throw 2016-05-10 09:57:13 +09:00
api-screen-spec.js autoformat more files 2016-03-30 17:00:31 -07:00
api-session-spec.js eradicate all per-file eslint globals 2016-03-30 17:00:34 -07:00
api-web-frame-spec.js eradicate all per-file eslint globals 2016-03-30 17:00:34 -07:00
api-web-request-spec.js provide option to override status line 2016-04-08 14:03:57 +05:30
asar-spec.js Override child_process.execFile asar patch for child_process.exec 2016-05-19 17:19:36 -04:00
chromium-spec.js Suppress the window.open tests on travis CI's mac machine 2016-05-08 15:15:16 +09:00
modules-spec.js autoformat more files 2016-03-30 17:00:31 -07:00
node-spec.js spec: We should not use pre release of Node 2016-04-05 19:53:07 +09:00
package.json eradicate all per-file eslint globals 2016-03-30 17:00:34 -07:00
webview-spec.js No more need to check for nodeIntegration when creating guest view 2016-05-17 17:06:02 +09:00