Skip to content

Commit df4132b

Browse files
chore(mobile): e2e runs keep Metro's output, the app's console logs, as metro.log
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 7f2dcd8 commit df4132b

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎scripts/mobile-e2e.ts‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// @effect-diagnostics nodeBuiltinImport:off globalDate:off - Host-side device automation uses Node subprocess and filesystem APIs directly.
33

44
import * as NodeChildProcess from "node:child_process";
5+
import * as NodeFS from "node:fs";
56
import * as NodeFSP from "node:fs/promises";
67
import * as NodeOS from "node:os";
78
import * as NodePath from "node:path";
@@ -224,7 +225,12 @@ async function main() {
224225
{
225226
cwd: NodePath.join(REPO_ROOT, "apps/mobile"),
226227
env: { ...NodeProcess.env, APP_VARIANT: "development", CI: "1" },
227-
stdio: ["ignore", "ignore", "inherit"],
228+
// The app's console output arrives through Metro; keep it with the run.
229+
stdio: [
230+
"ignore",
231+
NodeFS.openSync(NodePath.join(outputDirectory, "metro.log"), "w"),
232+
"inherit",
233+
],
228234
// Its own group, so stopping it also stops the expo child that owns the port.
229235
detached: true,
230236
},

0 commit comments

Comments
 (0)