Skip to content

Commit

Permalink
Pass absolute path to readFile
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed Aug 29, 2022
1 parent 1a0cb75 commit 0493f62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cli/format.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ async function formatFiles(context) {

let input;
try {
input = await fs.readFile(filename, "utf8");
input = await fs.readFile(path.join(process.cwd(), filename), "utf8");
} catch (error) {
// Add newline to split errors from filename line.
/* istanbul ignore next */
Expand Down

0 comments on commit 0493f62

Please sign in to comment.