Skip to content

Commit 4403fb4

Browse files
committed
fix(@angular/cli): change strategy for opening the browser when we call ng doc with Windows.
1 parent 37b4714 commit 4403fb4

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,14 @@ export class DocCommand extends Command<DocCommandSchema> {
1919
searchUrl = `https://www.google.com/search?q=site%3Aangular.io+${options.keyword}`;
2020
}
2121

22-
return opn(searchUrl, {
23-
wait: false,
24-
});
22+
let opt;
23+
if (process.platform === 'win32') {
24+
// window doesn't support to be called without `wait: true`
25+
opt = { app: 'chrome', wait: true };
26+
} else {
27+
opt = { wait: false };
28+
}
29+
30+
return opn(searchUrl, opt);
2531
}
2632
}

0 commit comments

Comments
 (0)