Skip to content

Commit

Permalink
Silently fail to auto-open the browser in wrangler pages dev comman…
Browse files Browse the repository at this point in the history
…d when that errors out (#211)
  • Loading branch information
GregBrimble authored Jan 7, 2022
1 parent 5d2c177 commit 3bbfd4f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/metal-ties-invent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wrangler": patch
---

Silently fail to auto-open the browser in `wrangler pages dev` command when that errors out.
4 changes: 3 additions & 1 deletion packages/wrangler/src/pages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,9 @@ export const pages: BuilderCallback<unknown, unknown> = (yargs) => {
console.log(`Serving at http://127.0.0.1:${port}/`);

if (process.env.BROWSER !== "none") {
await open(`http://127.0.0.1:${port}/`);
try {
await open(`http://127.0.0.1:${port}/`);
} catch {}
}

EXIT_CALLBACKS.push(() => {
Expand Down

0 comments on commit 3bbfd4f

Please sign in to comment.