Skip to content

Commit

Permalink
fix: merge in existing global.oclif
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley committed Feb 5, 2024
1 parent b2bea84 commit 132a7a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/parser/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const readStdin = async (): Promise<null | string> => {
if (stdin.isTTY) return null

return new Promise((resolve) => {
if (global.oclif.stdinCache) resolve(global.oclif.stdinCache)
if (global.oclif?.stdinCache) resolve(global.oclif.stdinCache)

let result = ''
const ac = new AbortController()
Expand All @@ -82,7 +82,7 @@ export const readStdin = async (): Promise<null | string> => {
rl.once('close', () => {
clearTimeout(timeout)
debug('resolved from stdin', result)
global.oclif.stdinCache = result
global.oclif = {...global.oclif, stdinCache: result}
resolve(result)
})

Expand Down

0 comments on commit 132a7a6

Please sign in to comment.