Title: setGithubActionsOutputAndEnvVars writes GITHUB_ENV/GITHUB_OUTPUT entries without a trailing newline · Issue #4003 · triggerdotdev/trigger.dev · GitHub
Open Graph Title: setGithubActionsOutputAndEnvVars writes GITHUB_ENV/GITHUB_OUTPUT entries without a trailing newline · Issue #4003 · triggerdotdev/trigger.dev
X Title: setGithubActionsOutputAndEnvVars writes GITHUB_ENV/GITHUB_OUTPUT entries without a trailing newline · Issue #4003 · triggerdotdev/trigger.dev
Description: Summary In packages/cli-v3/src/utilities/githubActions.ts, the helper builds entries.map(([k, v]) => ${k}=${v}).join("\n") and appendFileSyncs it to $GITHUB_ENV / $GITHUB_OUTPUT. .join("\n") only separates entries — there's no trailing n...
Open Graph Description: Summary In packages/cli-v3/src/utilities/githubActions.ts, the helper builds entries.map(([k, v]) => ${k}=${v}).join("\n") and appendFileSyncs it to $GITHUB_ENV / $GITHUB_OUTPUT. .join("\n") only s...
X Description: Summary In packages/cli-v3/src/utilities/githubActions.ts, the helper builds entries.map(([k, v]) => ${k}=${v}).join("\n") and appendFileSyncs it to $GITHUB_ENV / $GITHUB_OUTPUT. .join...
Opengraph URL: https://github.com/triggerdotdev/trigger.dev/issues/4003
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"setGithubActionsOutputAndEnvVars writes GITHUB_ENV/GITHUB_OUTPUT entries without a trailing newline","articleBody":"### Summary\n\nIn `packages/cli-v3/src/utilities/githubActions.ts`, the helper builds `entries.map(([k, v]) => `${k}=${v}`).join(\"\\n\")` and `appendFileSync`s it to `$GITHUB_ENV` / `$GITHUB_OUTPUT`. `.join(\"\\n\")` only separates entries — there's no trailing newline — so the last `KEY=value` is left on an unterminated line. The canonical `@actions/core` always terminates each entry with `os.EOL`.\n\n### Impact\n\nBoth call sites (`deploy.ts`) end their outputs block with `needsPromotion=...`, a documented, downstream-consumed Action output. Because the line is unterminated, a subsequent append to the same job-scoped file (by the runner or another step) can concatenate onto `needsPromotion=...` (and symmetrically the first key can merge onto a prior unterminated tail), producing malformed/merged values that break promotion branching. It's intermittent — GitHub often inserts its own newline and single-consumer runs are fine — which is why it has survived.\n\n### Suggested fix\n\nTerminate each entry with a newline, matching `@actions/core` — e.g. append a trailing `\\n` (or build with `.map(... => `${k}=${v}\\n`).join(\"\")`). Apply to both the GITHUB_ENV and GITHUB_OUTPUT writes. Scope to the missing terminator; multiline values (the `ghadelimiter` heredoc form) are a separate concern.\n","author":{"url":"https://github.com/yashs33244","@type":"Person","name":"yashs33244"},"datePublished":"2026-06-20T07:35:27Z","url":"https://github.com/triggerdotdev/trigger.dev/issues/4003"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:704ea8e5-cf07-61e4-e6ce-a2839316aaea |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C5A8:2A22C7:3525305:4BEA3BE:6AFB0846 |
| html-safe-nonce | be422494fb2ecf65155e335ded042d0aae4ec9e973771ab7af793a01e67de4f7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNUE4OjJBMjJDNzozNTI1MzA1OjRCRUEzQkU6NkFGQjA4NDYiLCJ2aXNpdG9yX2lkIjoiNjIzMDUxNzcwNDQyNDA5Nzg2MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | cde8cf4a2c020d0e8f4f6f89704ab27333e81bd9d79953474b0d4434db2bc82f |
| hovercard-subject-tag | issue:4705587384 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/triggerdotdev/trigger.dev/4003/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6219e7aff72853faf390f8ee1d787c037a0a40e9ec56e747c440dab261b7dc16/triggerdotdev/trigger.dev/issues/4003 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6219e7aff72853faf390f8ee1d787c037a0a40e9ec56e747c440dab261b7dc16/triggerdotdev/trigger.dev/issues/4003 |
| og:image:alt | Summary In packages/cli-v3/src/utilities/githubActions.ts, the helper builds entries.map(([k, v]) => ${k}=${v}).join("\n") and appendFileSyncs it to $GITHUB_ENV / $GITHUB_OUTPUT. .join("\n") only s... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | yashs33244 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 76fb13cb43f1834708971f45a9cfcab5df3177a7582086613d7cdc6e98c4bfde |
| turbo-cache-control | no-preview |
| go-import | github.com/triggerdotdev/trigger.dev git https://github.com/triggerdotdev/trigger.dev.git |
| octolytics-dimension-user_id | 95297378 |
| octolytics-dimension-user_login | triggerdotdev |
| octolytics-dimension-repository_id | 572570113 |
| octolytics-dimension-repository_nwo | triggerdotdev/trigger.dev |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 572570113 |
| octolytics-dimension-repository_network_root_nwo | triggerdotdev/trigger.dev |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | afc998826cdd963c8f91a96ae5372809ab5e296b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width