Skip to content

Commit

Permalink
fix: remove timeout on custom builds, and make sure logs are visible (#…
Browse files Browse the repository at this point in the history
…838)

This removes the timeout we have for custom builds. We shouldn't be applying this timeout anyway, since it doesn't block wrangler, just the user themselves. Further, in #759, we changed the custom build's process stdout/stderr config to "pipe" to pass tests, however that meant we wouldn't see logs in the terminal anymore. This patch removes the timeout, and brings back proper logging for custom builds.
  • Loading branch information
threepointone authored Apr 24, 2022
1 parent 206b9a5 commit 9c025c4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .changeset/calm-bottles-talk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"wrangler": patch
---

fix: remove timeout on custom builds, and make sure logs are visible

This removes the timeout we have for custom builds. We shouldn't be applying this timeout anyway, since it doesn't block wrangler, just the user themselves. Further, in https://github.com/cloudflare/wrangler2/pull/759, we changed the custom build's process stdout/stderr config to "pipe" to pass tests, however that meant we wouldn't see logs in the terminal anymore. This patch removes the timeout, and brings back proper logging for custom builds.
7 changes: 4 additions & 3 deletions packages/wrangler/src/entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,10 @@ export async function runCustomBuild(
console.log("running:", build.command);
await execaCommand(build.command, {
shell: true,
stdout: "pipe",
stderr: "pipe",
timeout: 1000 * 30,
// we keep these two as "inherit" so that
// logs are still visible.
stdout: "inherit",
stderr: "inherit",
...(build.cwd && { cwd: build.cwd }),
});

Expand Down

0 comments on commit 9c025c4

Please sign in to comment.