Introduce ELECTRON_NO_ASAR #7479

merged 4 commits into from Oct 12, 2016


None yet

2 participants

bpasero commented Oct 4, 2016

For #6295

This new environment variable can be used to disable ASAR support in forked processes. The use case is:

var res = cp.fork(path.join(__dirname, "forked.js"), { env: { "ELECTRON_NO_ASAR": "true" }});

This disables ASAR support in forked processes and does not force the forked process to set process.noAsar. This specifically enables to run a forked process in an environment that comes close to the real node.js environment without forcing it to use the non-node.js process.noAsar trick.

@kevinsawicki kevinsawicki self-assigned this Oct 4, 2016

@bpasero I added a few specs and also added a check to only disable asar when ELECTRON_NO_ASAR is set and the process.type isn't browser nor renderer. This is so running ELECTRON_NO_ASAR=1 electron.exe does not cause Electron to fail to launch.

Please confirm these changes look good to you and I'll merge this in.

bpasero and others added some commits Oct 4, 2016
@bpasero @kevinsawicki bpasero introduce ELECTRON_NO_ASAR 656ee0d
@kevinsawicki kevinsawicki Add specs for ELECTRON_NO_ASAR env var 8897a7a
@kevinsawicki kevinsawicki Only support ELECTRON_NO_ASAR in non browser/renderer processes f553d16
@kevinsawicki kevinsawicki Mention spawning with ELECTRON_RUN_AS_NODE

Please confirm these changes look good to you and I'll merge this in.

Going to merge this in, thanks for adding it 👍

@kevinsawicki kevinsawicki merged commit fefc7c2 into electron:master Oct 12, 2016

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
continuous-integration/appveyor/pr AppVeyor build succeeded
@bpasero bpasero deleted the bpasero:process-no-asar branch Oct 13, 2016
bpasero commented Oct 13, 2016 edited

@kevinsawicki thanks for the additional changes and merging it in 👍

@aluxian-huginn aluxian-huginn referenced this pull request in Aluxian/Messenger-for-Desktop Oct 20, 2016

Update dependency: electron v1.4.4 #885

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment