-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Console] Register terminal env variables #19724
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
/** | ||
* Register terminal related environment variables. | ||
*/ | ||
public function registerEnv() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we want that method. You should putenv() above directly IMHO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps you're right. This would make this PR a bugfix only (despite the fact it can only target 3.2 right now), but I hesitated. I thought this method would be convenient to easily register all terminal related env vars at once in a script before calling a process, even if that's not much.
But fair enough, I'll remove it for now. (Feature label can be removed)
👍 |
1 similar comment
👍 |
Thank you @ogizanagi. |
This PR was merged into the 3.2-dev branch. Discussion ---------- [Console] Register terminal env variables | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #19719 | License | MIT | Doc PR | - Solves #19719 by setting `COLUMNS` & `LINES` env vars when running an Application. Those env vars are then meant to be reused when using the Process component. ~~It creates a new `Terminal::registerEnv()` method allowing to register terminal related informations into environment variables. ~~It allows getting "consistent terminal informations" across processes.~~ Unless the env vars handling is backported from the 3.2 `Terminal` class to older branches in the `Application` class, the mentioned issue can't be solved this way. Commits ------- 926bc51 [Console] Register terminal env variables
Solves #19719 by setting
COLUMNS
&LINES
env vars when running an Application.Those env vars are then meant to be reused when using the Process component.
It creates a newTerminal::registerEnv()
method allowing to register terminal related informations into environment variables.It allows getting "consistent terminal informations" across processes.Unless the env vars handling is backported from the 3.2
Terminal
class to older branches in theApplication
class, the mentioned issue can't be solved this way.