|
@@ -1,6 +1,6 @@
|
|
|
(function () {
|
|
|
const asar = process.binding('atom_common_asar')
|
|
|
- const child_process = require('child_process')
|
|
|
+ const childProcess = require('child_process')
|
|
|
const path = require('path')
|
|
|
const util = require('util')
|
|
|
|
|
@@ -591,13 +591,13 @@
|
|
|
}
|
|
|
|
|
|
// Executing a command string containing a path to an asar
|
|
|
- // archive confuses `child_process.execFile`, which is internally
|
|
|
- // called by `child_process.{exec,execSync}`, causing
|
|
|
+ // archive confuses `childProcess.execFile`, which is internally
|
|
|
+ // called by `childProcess.{exec,execSync}`, causing
|
|
|
// Electron to consider the full command as a single path
|
|
|
// to an archive.
|
|
|
[ 'exec', 'execSync' ].forEach(function (functionName) {
|
|
|
- var old = child_process[functionName]
|
|
|
- child_process[functionName] = function () {
|
|
|
+ var old = childProcess[functionName]
|
|
|
+ childProcess[functionName] = function () {
|
|
|
var processNoAsarOriginalValue = process.noAsar
|
|
|
process.noAsar = true
|
|
|
var result = old.apply(this, arguments)
|
|
@@ -607,10 +607,10 @@
|
|
|
})
|
|
|
|
|
|
overrideAPI(fs, 'open')
|
|
|
- overrideAPI(child_process, 'execFile')
|
|
|
+ overrideAPI(childProcess, 'execFile')
|
|
|
overrideAPISync(process, 'dlopen', 1)
|
|
|
overrideAPISync(require('module')._extensions, '.node', 1)
|
|
|
overrideAPISync(fs, 'openSync')
|
|
|
- return overrideAPISync(child_process, 'execFileSync')
|
|
|
+ return overrideAPISync(childProcess, 'execFileSync')
|
|
|
}
|
|
|
})()
|