Skip to content

Commit

Permalink
fix: Correctly await reading package json file
Browse files Browse the repository at this point in the history
  • Loading branch information
danez committed Nov 13, 2019
1 parent 61201d1 commit 0cc65e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/spire/lib/create-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ const { pathExists, readJson, writeJSON } = require('fs-extra');

function createCore({ cwd }, { setState, getState }) {
async function hasFile(file) {
return await pathExists(join(cwd, file));
return pathExists(join(cwd, file));
}
async function getPackageProp(prop) {
const pkgPath = join(cwd, 'package.json');
return await readJson(pkgPath)[prop];
return (await readJson(pkgPath))[prop];
}
async function hasPackageProp(prop) {
return (await getPackageProp(prop)) !== undefined;
Expand Down

0 comments on commit 0cc65e4

Please sign in to comment.