Skip to content

Commit

Permalink
refactor: compatible windows os
Browse files Browse the repository at this point in the history
  • Loading branch information
PeachScript committed Sep 12, 2023
1 parent e4ff983 commit d7a4580
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/doctor/rules/TSCONFIG_RISK.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ export default (api: IApi) => {
if (bundlessConfigs.length) {
const tsconfigPath = getTsconfigPath(api.cwd);
// only check when tsconfig.json is in cwd
const tsconfig = tsconfigPath?.includes(api.cwd) && getTsconfig(api.cwd);
const tsconfig =
tsconfigPath &&
winPath(tsconfigPath).includes(api.cwd) &&
getTsconfig(api.cwd);

if (tsconfig && tsconfig.options.declaration) {
const inputs = bundlessConfigs.map((c) => c.input);
Expand Down

0 comments on commit d7a4580

Please sign in to comment.