docs(cli): dev --env-file values reach your tasks - #4478
Conversation
🦋 Changeset detectedLatest commit: 146c35f The changes in this PR will be included in the next version bump. This PR includes changesets to release 27 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Hi @BILLKISHORE, thanks for your interest in contributing! This project requires that pull request authors are vouched, and you are not in the list of vouched users. This PR will be closed automatically. See https://github.com/triggerdotdev/trigger.dev/blob/main/CONTRIBUTING.md for more details. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
WalkthroughUpdated ✨ 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 |
Closes #4425
The
--env-filedocs snippet says the file only hydrates the CLI'sprocess.envand not the tasks. That's true fordeployandpreview archive, but not fordev:DevSupervisor.#getEnvVars()passesargs.envFileintoresolveLocalEnvVars, so the file ends up in the run environment.The snippet is shared by four pages, so I reworded it to cover both cases instead of splitting it. I added the same fact to
trigger dev --help, which was silent on it.dev archive --helpalready said "CLI process" and is correct, so it's untouched.I fixed the docs rather than changing
dev, since the behavior has shipped for a long time and people rely on--env-filereaching tasks. Happy to flip it the other way if you'd ratherdevmatched the old wording.✅ Checklist
Testing
Built the CLI and checked both help outputs:
Also ran
pnpm run format,pnpm run lintandpnpm run build --filter trigger.dev.Changelog
trigger dev --helpand the CLI docs now say that--env-filevalues are passed to your tasks, not just the CLI process.Screenshots
n/a
Two things I noticed reading this, left alone since they're separate issues:
resolveLocalEnvVarsthe dotenv values are spread last, so--env-fileoverrides the environment variables set in the dashboard. That may be intended, but it isn't documented.docs/cli-switch.mdxincludes this snippet, butswitch.tshas no--env-fileoption.