From 08aa655ef00f61da9a8c2726a5ca45f482c677ff Mon Sep 17 00:00:00 2001 From: AngelaLu Date: Fri, 22 Jan 2021 21:05:36 -0800 Subject: [PATCH] change fsaccess back to existsSync --- src/init.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/init.js b/src/init.js index 2e1c2ef13..160757eab 100644 --- a/src/init.js +++ b/src/init.js @@ -68,7 +68,8 @@ module.exports = async function initHandler(argv) { async function asyncPackageInit() { // use existing package.json if found - const hasPackage = await fs.access('package.json'); + // eslint-disable-next-line node/no-sync + const hasPackage = fs.existsSync('package.json'); if (hasPackage) { @@ -90,7 +91,8 @@ async function asyncPackageInit() { } // exit if yarn.lock is found, or we'll be in trouble - const usesYarn = await fs.access('yarn.lock'); + // eslint-disable-next-line node/no-sync + const usesYarn = fs.existsSync('yarn.lock'); if (usesYarn) { logError(