Commit graph

25 commits

Author SHA1 Message Date
Felix Rieseberg
f7d6e3fa7b 🔧 Disable standard/no-callback-literal where necessary 2017-11-23 13:53:03 -08:00
Felix Rieseberg
451a44c4b5 🔧 Don’t use deprecated new Buffer() 2017-11-23 13:41:47 -08:00
Felix Rieseberg
05bae0b4c4 🔧 Util is no longer used here 2017-11-20 09:52:13 -08:00
Felix Rieseberg
71b8eaf085 🔧 Don’t use deprecated util.is* methods 2017-11-20 09:40:47 -08:00
Felix Rieseberg
c9f2080e4b 🔧 fs.readFile: options are optional 2017-11-20 08:20:20 -08:00
Siyuan Liu
f56abac7a8 fix linting error 2017-08-01 17:52:48 +08:00
Siyuan Liu
5a48c1feed fixes 10128 2017-07-31 09:32:45 +08:00
Kevin Sawicki
bea1a0643c Memoize ELECTRON_NO_ASAR env var check 2016-11-16 07:37:53 -08:00
Kevin Sawicki
f553d16539 Only support ELECTRON_NO_ASAR in non browser/renderer processes 2016-10-12 11:11:27 -07:00
Benjamin Pasero
656ee0d9c3 introduce ELECTRON_NO_ASAR 2016-10-12 11:11:27 -07:00
Kevin Sawicki
902bd0564e Require Buffer explicitly instead of relying on global 2016-09-08 10:17:06 -07:00
Kevin Sawicki
46fbb6ed61 Reset process.noAsar in finally block 2016-09-06 13:40:25 -07:00
Kevin Sawicki
8eca019157 Support paths as Buffers 2016-07-25 11:10:36 -07:00
Kevin Sawicki
30fbe92970 Add asar-supported fs.accessSync implementation 2016-07-25 11:05:18 -07:00
Kevin Sawicki
3ad5504194 Add asar-supported fs.access implementation 2016-07-25 10:50:30 -07:00
Kevin Sawicki
a518c47f4c Use let/const instead of var 2016-07-25 10:43:38 -07:00
Felix Rieseberg
bef6748c06 🎨 Implement JS Standard Code Style 7
Updates Standard Code Style to 7 (latest major) and ensures that code
is conform.

 * camelCase is now enforced
 * No assignments in return statements
2016-05-25 16:20:49 -07:00
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
Zeke Sikelianos
42e7ee2b4a finish standardizing! 2016-03-30 17:00:33 -07:00
Zeke Sikelianos
e6698102c9 standardize by hand 2016-03-30 17:00:33 -07:00
Zeke Sikelianos
c4b6cf4a8e do more manual cleanup and specify globals 2016-03-30 17:00:32 -07:00
Zeke Sikelianos
67fa250020 standardize asar.js by hand 2016-03-30 17:00:31 -07:00
Kevin Sawicki
4f4dc2f4d8 Use destructuring assigment 2016-03-22 13:11:42 -07:00
Kevin Sawicki
3a1e837f8b Don't collect results in exit event callback 2016-03-11 08:55:47 -08:00
Kevin Sawicki
70aa9b06ee Move JavaScript to root lib/ folder 2016-03-08 11:14:21 -08:00
Renamed from atom/common/lib/asar.js (Browse further)