Skip to content

Commit f1b70ee

Browse files
committed
chore(build) for #677
1 parent 9ba9169 commit f1b70ee

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

dist/worker/lib/workerLib.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,15 @@ var Parent = (function (_super) {
153153
Parent.prototype.startWorker = function (childJsPath, terminalError, customArguments) {
154154
var _this = this;
155155
try {
156+
var spawnEnv = (process.platform === 'linux') ? Object.create(process.env) : {};
157+
spawnEnv['ATOM_SHELL_INTERNAL_RUN_AS_NODE'] = '1';
156158
this.child = spawn(this.node, [
157159
childJsPath
158-
].concat(customArguments), { cwd: path.dirname(childJsPath), env: { ATOM_SHELL_INTERNAL_RUN_AS_NODE: '1' }, stdio: ['ipc'] });
160+
].concat(customArguments), {
161+
cwd: path.dirname(childJsPath),
162+
env: spawnEnv,
163+
stdio: ['ipc']
164+
});
159165
this.child.on('error', function (err) {
160166
if (err.code === "ENOENT" && err.path === _this.node) {
161167
_this.gotENOENTonSpawnNode = true;

0 commit comments

Comments
 (0)