mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[functional testing] Use sync methods
This commit is contained in:
parent
6d44d2e9ef
commit
5ae159d6b7
1 changed files with 12 additions and 11 deletions
|
@ -56,18 +56,19 @@ module.exports = function (grunt) {
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
function start() {
|
||||
fs.mkdir(config.selenium.directory, function (err) {
|
||||
if (err && err.code !== 'EEXIST') return grunt.fail.warn(err);
|
||||
fs.exists(SELENIUM_FILE_PATH, function (exists) {
|
||||
if (exists) {
|
||||
spawnSelenium();
|
||||
} else {
|
||||
downloadSelenium(spawnSelenium);
|
||||
}
|
||||
});
|
||||
});
|
||||
try {
|
||||
fs.mkdirSync(config.selenium.directory);
|
||||
|
||||
} catch (err) {
|
||||
if (err && err.code !== 'EEXIST') grunt.fail.warn(err);
|
||||
}
|
||||
|
||||
if (fs.existsSync(SELENIUM_FILE_PATH)) {
|
||||
spawnSelenium();
|
||||
} else {
|
||||
downloadSelenium(spawnSelenium);
|
||||
}
|
||||
}
|
||||
|
||||
start();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue