Skip to content

Commit

Permalink
fix: try to support Yarn PnP
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavopch committed Jul 4, 2023
1 parent b4cdeb5 commit 834091d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,13 @@ for (const eventName of ['exit', 'SIGHUP', 'SIGINT', 'SIGTERM']) {

// Type-check our files
const { status } = spawnSync(
resolveFromModule(
'typescript',
`../.bin/tsc${process.platform === 'win32' ? '.cmd' : ''}`,
),
// See: https://github.com/gustavopch/tsc-files/issues/44#issuecomment-1250783206
process.versions.pnp
? 'tsc'
: resolveFromModule(
'typescript',
`../.bin/tsc${process.platform === 'win32' ? '.cmd' : ''}`,
),
['-p', tmpTsconfigPath, ...remainingArgsToForward],
{ stdio: 'inherit' },
)
Expand Down

0 comments on commit 834091d

Please sign in to comment.