You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
408 B
17 lines
408 B
const { runCommand } = require('../../development/lib/run-command');
|
|
const { retry } = require('../../development/lib/retry');
|
|
|
|
function ensureXServerIsRunning() {
|
|
return retry(
|
|
{
|
|
retries: 3,
|
|
delay: 2000,
|
|
rejectionMessage: 'X server does not seem to be running?!',
|
|
},
|
|
() => {
|
|
return runCommand('xset', ['q']);
|
|
},
|
|
);
|
|
}
|
|
|
|
module.exports = { ensureXServerIsRunning };
|
|
|