Repository navigation
Implement --eval as alternative to sub-shell mode and envrc - #329
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the
Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Summary
--evalflag toroxie deployandroxie shell, enablingeval "$(roxie deploy --eval)"/eval "$(roxie shell --eval)"workflows to source ACS environment variables directly into the current shell — no subshell needed, so aliases, functions, and all shell state are preserved.--eval.-l -iinstead of just-i, so login profile files (~/.bash_profile,~/.zprofile) are sourced — picks up aliases defined there.Motivation
Colleagues reported that shell aliases defined in their local setup were missing in the roxie subshell. The subshell is a new process that can never fully replicate the parent shell's state.
--evalsidesteps the problem entirely by staying in the user's existing shell.Test plan
eval "$(roxie deploy --eval)"deploys and exports env vars into current shelleval "$(roxie shell --eval)"re-exports env vars for existing deploymentroxctl central whoamiworks after eval (CA cert file persists)roxie deploy(without--eval) still spawns subshell with banner and colorsroxie deploy --eval --envrc fooerrors with mutual exclusivity messageevaland subshell modesNO_COLOR=1 roxie deploydisables colorsSummary by CodeRabbit
--evalsupport to deployment and shell commands to print shell-ready environment exports instead of launching a subshell. Banners are sent to stderr, keeping exports on stdout.--eval. Shell eval mode can also report detached port forwarding.