mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Detect headless environment using process.type
Signed-off-by: Nathan Sobo <nathan@github.com>
This commit is contained in:
committed by
Thomas Johansen
parent
937e595091
commit
09a296fc0e
@@ -37,7 +37,7 @@ if (process.platform === 'win32') {
|
||||
|
||||
// The following classes can't be used from a Task handler and should therefore
|
||||
// only be exported when not running as a child node process
|
||||
if (!process.env.ATOM_SHELL_INTERNAL_RUN_AS_NODE) {
|
||||
if (process.type === 'renderer') {
|
||||
atomExport.Task = require('../src/task')
|
||||
|
||||
const TextEditor = (params) => {
|
||||
|
||||
Reference in New Issue
Block a user