Skip to content
This repository has been archived by the owner on Sep 9, 2021. It is now read-only.

Commit

Permalink
change fsaccess back to existsSync
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelaLu committed Jan 23, 2021
1 parent 54e94d1 commit 08aa655
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {

Expand All @@ -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(
Expand Down

0 comments on commit 08aa655

Please sign in to comment.