Make sure configs are read sync. (#3882)

* Make sure configs are read sync.

Fix for https://github.com/sitespeedio/sitespeed.io/issues/3881

* lint
This commit is contained in:
Peter Hedenskog 2023-06-14 10:11:19 +02:00 committed by GitHub
parent 160c045cfd
commit d60d55975a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -10,7 +10,6 @@ import reduce from 'lodash.reduce';
import set from 'lodash.set';
import get from 'lodash.get';
import { findUpSync } from 'find-up';
import { readFile } from 'node:fs/promises';
import { getURLs, getAliases } from './util.js';
import { toArray } from '../support/util.js';
@ -2057,7 +2056,7 @@ export async function parseCommandLine() {
if (argv.config) {
const config = JSON.parse(
await readFile(
await readFileSync(
new URL(resolve(process.cwd(), argv.config), import.meta.url)
)
);