Skip to content

Commit 834091d

Browse files
committed
fix: try to support Yarn PnP
1 parent b4cdeb5 commit 834091d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

cli.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,13 @@ for (const eventName of ['exit', 'SIGHUP', 'SIGINT', 'SIGTERM']) {
7474

7575
// Type-check our files
7676
const { status } = spawnSync(
77-
resolveFromModule(
78-
'typescript',
79-
`../.bin/tsc${process.platform === 'win32' ? '.cmd' : ''}`,
80-
),
77+
// See: https://github.com/gustavopch/tsc-files/issues/44#issuecomment-1250783206
78+
process.versions.pnp
79+
? 'tsc'
80+
: resolveFromModule(
81+
'typescript',
82+
`../.bin/tsc${process.platform === 'win32' ? '.cmd' : ''}`,
83+
),
8184
['-p', tmpTsconfigPath, ...remainingArgsToForward],
8285
{ stdio: 'inherit' },
8386
)

0 commit comments

Comments
 (0)