We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 089537a commit f5b4e30Copy full SHA for f5b4e30
src/bin.js
@@ -1,6 +1,6 @@
1
#!/usr/bin/env node
2
3
-import { readFileSync } from 'fs'
+import { readFile as fsReadFile } from 'fs/promises'
4
import { join } from 'path'
5
import pc from 'picocolors'
6
import { Program } from './program'
@@ -20,9 +20,9 @@ async function getStdin() {
20
return result
21
}
22
23
-function readFile(pathParam) {
+async function readFile(pathParam) {
24
const pathName = join(process.cwd(), pathParam)
25
- const content = readFileSync(pathName, 'utf-8')
+ const content = await fsReadFile(pathName, 'utf-8')
26
return content
27
28
0 commit comments