Skip to content

Commit

Permalink
fix: wildcards on Windows (Issue: #1521) (#1522)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitri-trofimov authored Apr 23, 2024
1 parent 210f4f1 commit 89af9c6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/soft-berries-remain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@redocly/cli": patch
---

Fixed handling of wildcards on Windows ([#1521](https://github.com/Redocly/redocly-cli/issues/1521)).
3 changes: 2 additions & 1 deletion packages/cli/src/utils/miscellaneous.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import * as fs from 'fs';
import * as readline from 'readline';
import { Writable } from 'stream';
import { execSync } from 'child_process';
import { promisify } from 'util';
import {
BundleOutputFormat,
StyleguideConfig,
Expand Down Expand Up @@ -106,7 +107,7 @@ async function expandGlobsInEntrypoints(args: string[], config: ConfigApis) {
await Promise.all(
(args as string[]).map(async (aliasOrPath) => {
return glob.hasMagic(aliasOrPath) && !isAbsoluteUrl(aliasOrPath)
? (await glob.__promisify__(aliasOrPath)).map((g: string) => getAliasOrPath(config, g))
? (await promisify(glob)(aliasOrPath)).map((g: string) => getAliasOrPath(config, g))
: getAliasOrPath(config, aliasOrPath);
})
)
Expand Down

1 comment on commit 89af9c6

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 76.84% 4416/5747
🟡 Branches 67.1% 2400/3577
🟡 Functions 70.58% 734/1040
🟡 Lines 77.01% 4146/5384

Test suite run success

722 tests passing in 101 suites.

Report generated by 🧪jest coverage report action from 89af9c6

Please sign in to comment.