8000 Fixed usage of deprecated electron env vars · code-tree/atom-typescript@c3bd819 · GitHub
[go: up one dir, main page]

Skip to content

Commit c3bd819

Browse files
committed
Fixed usage of deprecated electron env vars
ATOM_SHELL_INTERNAL_RUN_AS_NODE has long been renamed to ELECTRON_RUN_AS_NODE.
1 parent 6fb8413 commit c3bd819

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

dist/main/atom/commands/outputFileCommands.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@ function register() {
4040
else {
4141
var command = "node " + path.basename(res.jsFilePath);
4242
console.log(command);
43-
child_process_1.exec(command, { cwd: path.dirname(res.jsFilePath), env: { ATOM_SHELL_INTERNAL_RUN_AS_NODE: '1' } }, function (err, stdout, stderr) {
43+
child_process_1.exec(command, {
44+
cwd: path.dirname(res.jsFilePath),
45+
env: {
46+
ELECTRON_RUN_AS_NODE: 1,
47+
},
48+
}, function (err, stdout, stderr) {
4449
console.log(stdout);
4550
if (stderr.toString().trim().length) {
4651
console.error(stderr);

dist/worker/lib/workerLib.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ var Parent = (function (_super) {
156156
var _this = this;
157157
try {
158158
var spawnEnv = (process.platform === 'linux') ? Object.create(process.env) : {};
159-
spawnEnv['ATOM_SHELL_INTERNAL_RUN_AS_NODE'] = '1';
159+
spawnEnv['ELECTRON_RUN_AS_NODE'] = 1;
160160
this.child = spawn(this.node, [
161161
childJsPath
162162
].concat(customArguments), {

lib/main/atom/commands/outputFileCommands.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,12 @@ export function register() {
4747
var command = `node ${path.basename(res.jsFilePath) }`;
4848
console.log(command);
4949

50-
exec(command, { cwd: path.dirname(res.jsFilePath), env: { ATOM_SHELL_INTERNAL_RUN_AS_NODE: '1' } }, (err, stdout, stderr) => {
50+
exec(command, {
51+
cwd: path.dirname(res.jsFilePath),
52+
env: {
53+
ELECTRON_RUN_AS_NODE: 1,
54+
},
55+
}, (err, stdout, stderr) => {
5156
console.log(stdout);
5257
if (stderr.toString().trim().length) {
5358
console.error(stderr);

lib/worker/lib/workerLib.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ export class Parent extends RequesterResponder {
235235
dynamic libraries to be properly linked.
236236
On Windows/MacOS, it needs to be cleared, cf. atom/atom#2887 */
237237
var spawnEnv = (process.platform === 'linux') ? Object.create(process.env) : {};
238-
spawnEnv['ATOM_SHELL_INTERNAL_RUN_AS_NODE'] = '1';
238+
spawnEnv['ELECTRON_RUN_AS_NODE'] = 1;
239239
this.child = spawn(this.node, [
240240
// '--debug', // Uncomment if you want to debug the child process
241241
childJsPath

0 commit comments

Comments
 (0)
0