mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-30 08:09:15 +01:00
18 lines
408 B
JavaScript
18 lines
408 B
JavaScript
|
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 };
|