Skip to content

Commit

Permalink
async readFile
Browse files Browse the repository at this point in the history
  • Loading branch information
Bart Veneman committed Sep 12, 2023
1 parent 089537a commit f5b4e30
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/bin.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node

import { readFileSync } from 'fs'
import { readFile as fsReadFile } from 'fs/promises'
import { join } from 'path'
import pc from 'picocolors'
import { Program } from './program'
Expand All @@ -20,9 +20,9 @@ async function getStdin() {
return result
}

function readFile(pathParam) {
async function readFile(pathParam) {
const pathName = join(process.cwd(), pathParam)
const content = readFileSync(pathName, 'utf-8')
const content = await fsReadFile(pathName, 'utf-8')
return content
}

Expand Down

0 comments on commit f5b4e30

Please sign in to comment.