diff --git a/scripts/check/check-package.ts b/scripts/check/check-package.ts index ac7be8b0f655..e6a92337e8e9 100644 --- a/scripts/check/check-package.ts +++ b/scripts/check/check-package.ts @@ -1,3 +1,5 @@ +import path from 'node:path'; + import { getTSDiagnostics, getTSFilesAndConfig, getTSProgramAndHost } from './utils/typescript'; const tsconfigPath = 'tsconfig.json'; @@ -5,7 +7,7 @@ const tsconfigPath = 'tsconfig.json'; const { options, fileNames } = getTSFilesAndConfig(tsconfigPath); const { program, host } = getTSProgramAndHost(fileNames, options); -const tsDiagnostics = getTSDiagnostics(program, process.cwd(), host); +const tsDiagnostics = getTSDiagnostics(program, process.cwd().replaceAll(path.sep, '/'), host); if (tsDiagnostics.length > 0) { console.log(tsDiagnostics); process.exit(1);