fix(runtime): treat null env as run mismatch - #35
Conversation
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3a0dd44e80
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| runtimeState?.envName !== null && | ||
| runtimeState?.envName !== opts.requestedEnvName | ||
| ) { | ||
| if (runtimeState && runtimeState.envName !== opts.requestedEnvName) { |
There was a problem hiding this comment.
Compare runtime env against effective run env
The new mismatch check treats any stored non-null runtime env as incompatible when --env is omitted, because handleRun passes requestedEnvName as envName ?? null and resolveComposeEnvOverrides can still select a non-base default overlay. In that common env.defaultOverlay case, this condition makes hack run stop using --no-deps even when the live stack env actually matches the effective env, causing unnecessary dependency startup on every run.
Useful? React with 👍 / 👎.
Summary
null) as a mismatch whenhack run --env ...targets a different overlay--no-depsdisabled unless the live stack env matches the requested envVerification
bun test tests/project-run-command.test.tsbun run typecheckbun x ultracite check src/commands/project.ts tests/project-run-command.test.ts