Skip to content

Commit c2735c0

Browse files
juliusmarmingecodex
andcommitted
Require browser flag for dev auto-open
Co-authored-by: codex <[email protected]>
1 parent c61dc54 commit c2735c0

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

‎scripts/dev-runner.test.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,23 +167,23 @@ it.layer(NodeServices.layer)("dev-runner", (it) => {
167167
}),
168168
);
169169

170-
it.effect("preserves the environment opt-in when the CLI flag is omitted", () =>
170+
it.effect("requires the browser flag even when the environment enables auto-open", () =>
171171
Effect.gen(function* () {
172172
const env = yield* createDevRunnerEnv({
173173
mode: "dev",
174174
baseEnv: { T3CODE_NO_BROWSER: "0" },
175175
serverOffset: 0,
176176
webOffset: 0,
177177
t3Home: undefined,
178-
browser: undefined,
178+
browser: false,
179179
autoBootstrapProjectFromCwd: undefined,
180180
logWebSocketEvents: undefined,
181181
host: undefined,
182182
port: undefined,
183183
devUrl: undefined,
184184
});
185185

186-
assert.equal(env.T3CODE_NO_BROWSER, "0");
186+
assert.equal(env.T3CODE_NO_BROWSER, "1");
187187
}),
188188
);
189189

‎scripts/dev-runner.ts‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -281,11 +281,7 @@ export function createDevRunnerEnv({
281281
}
282282

283283
if (!isDesktopMode) {
284-
if (browser === true) {
285-
output.T3CODE_NO_BROWSER = "0";
286-
} else if (!output.T3CODE_NO_BROWSER?.trim()) {
287-
output.T3CODE_NO_BROWSER = "1";
288-
}
284+
output.T3CODE_NO_BROWSER = browser === true ? "0" : "1";
289285
}
290286

291287
if (autoBootstrapProjectFromCwd !== undefined) {

0 commit comments

Comments
 (0)