Skip to content

Commit ec94f42

Browse files
wKozaalexeagle
authored andcommitted
fix(@angular/cli): wrap opn in a new Promise because opn is already resolve is already resolve.
1 parent 5415bcc commit ec94f42

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/angular/cli/commands/doc-impl.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@ export class DocCommand extends Command<DocCommandSchema> {
2424
searchUrl = `https://www.google.com/search?q=site%3Aangular.io+${options.keyword}`;
2525
}
2626

27-
return opn(searchUrl, {
28-
wait: false,
27+
// We should wrap `opn` in a new Promise because `opn` is already resolved
28+
await new Promise(() => {
29+
opn(searchUrl, {
30+
wait: false,
31+
});
2932
});
3033
}
3134
}

0 commit comments

Comments
 (0)