mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-12 04:37:13 +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 };
|