Detect headless environment using process.type

Signed-off-by: Nathan Sobo <nathan@github.com>
This commit is contained in:
Max Brunsfeld
2016-08-24 13:57:25 -07:00
committed by Thomas Johansen
parent 937e595091
commit 09a296fc0e

View File

@@ -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) => {