Skip to content

Commit

Permalink
Merge pull request #60 from hackmdio/bug/pipe-export-content-to-stdout
Browse files Browse the repository at this point in the history
fix: stdin unavailable read when accessing stdin.fd
  • Loading branch information
Yukaii authored Mar 11, 2022
2 parents bf3d8f0 + 98a32c4 commit 499afdf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ export function setAccessTokenConfig(token: string) {

export function safeStdinRead() {
let result
const STDIN_FD = 0
try {
result = fs.readFileSync(process.stdin.fd).toString()
result = fs.readFileSync(STDIN_FD).toString()
} catch {}

return result
}

0 comments on commit 499afdf

Please sign in to comment.