fix(ppfox): check directory existance if necessary when running tests (#3871)

This commit is contained in:
Andrey Lushnikov 2019-01-31 17:30:34 -08:00 committed by GitHub
parent a2f1e2774a
commit d89ec00122
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,8 +16,10 @@ async function installFirefoxPreferences(executablePath) {
prefPath = path.join(firefoxFolder, '..', 'Resources', 'defaults', 'pref');
configPath = path.join(firefoxFolder, '..', 'Resources');
} else if (os.platform() === 'linux') {
await mkdirAsync(path.join(firefoxFolder, 'browser', 'defaults'));
await mkdirAsync(path.join(firefoxFolder, 'browser', 'defaults', 'preferences'));
if (!fs.existsSync(path.join(firefoxFolder, 'browser', 'defaults')))
await mkdirAsync(path.join(firefoxFolder, 'browser', 'defaults'));
if (!fs.existsSync(path.join(firefoxFolder, 'browser', 'defaults', 'preferences')))
await mkdirAsync(path.join(firefoxFolder, 'browser', 'defaults', 'preferences'));
prefPath = path.join(firefoxFolder, 'browser', 'defaults', 'preferences');
configPath = firefoxFolder;
} else if (os.platform() === 'win32') {