Skip to content

Commit

Permalink
Pop up warning and abort if there is no DISPLAY on Linux and you are …
Browse files Browse the repository at this point in the history
…runnign in UI mode.
  • Loading branch information
tecimovic committed Apr 16, 2021
1 parent cfdccba commit afd2d01
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src-script/zap-start.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ scriptUtil
)
executor = 'node'
else executor = 'electron'

if (executor === 'electron' && process.platform == 'linux') {
if (!process.env.DISPLAY) {
console.log(`
⛔ You are on linux, you are attempting to run zap in UI mode without DISPLAY set.
⛔ Please set your DISPLAY environment variable if you wish to proceed.`)
process.exit(1)
}
}
cmdArgs.push(...args)
return scriptUtil.executeCmd(ctx, executor, cmdArgs)
})
Expand Down

0 comments on commit afd2d01

Please sign in to comment.