fix(env): JSON error envelope + non-zero exit when unlinked; honor --site#8334
fix(env): JSON error envelope + non-zero exit when unlinked; honor --site#8334DavidWells wants to merge 1 commit into
Conversation
…site
env:get/list/set/unset/import in an unlinked folder emitted nothing and
exited 0 - with --json that is indistinguishable from an empty value.
Failures now emit {"error":{code,message,fix}} on stdout with --json,
write the message to stderr otherwise, and exit 1. The documented
--site flag was silently ignored; it now resolves the target site.
|
Warning Review limit reached
Next review available in: 49 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (10)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Split from #8300 (6 of 9).
What
netlify env:get DATABASE_URL --jsonin an unlinked directory used to emit zero bytes with exit 0. Now it exits 1 with:{ "error": { "code": "NOT_LINKED", "message": "No project id found, please run inside a project folder or `netlify link`", "fix": "netlify link" } }Applies to
env:get/list/set/unset/importandenv:clone(custom--frommessage). Non-JSON invocations write the message to stderr and exit 1. Also: the documented-but-ignored--siteflag now actually resolves the target project.Why it helps agents
Empty stdout + exit 0 is how empty secrets end up in configs — a consumer can't tell "variable is empty" from "you're not linked." A stable
error.codeplus afixfield lets an agent branch and self-correct instead of guessing from silence.Testing
--siteresolution; env integration tests updated (env:clone now asserts exit 1 + message)