Skip to content

Commit

Permalink
fix(utils): encoding utf8 added to readFile function
Browse files Browse the repository at this point in the history
  • Loading branch information
krishna-gujjjar authored Feb 12, 2024
1 parent 4803d98 commit 996da6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/io.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const readFileAsString = async (filePath: string): Promise<string> => {
// Read the file contents.
const content = isBunRunning()
? await Bun.file(path).text()
: (await readFile(path)).toString();
: await readFile(path, { encoding: "utf8" });

if (typeof content !== "string") {
return JSON.stringify(content);
Expand Down

0 comments on commit 996da6d

Please sign in to comment.