lando / core-next

Next generation Lando v4 runtime
https://docs.lando.dev/core/v4
GNU General Public License v3.0
3 stars 4 forks source link

Pass terminal dimensions into container #42

Closed AaronFeledy closed 2 weeks ago

AaronFeledy commented 11 months ago

Resolves lando/lando#1847 by grabbing the current terminal dimensions and passing them in with the tooling command at run time via the LINES and COLUMNS env vars. The same fix is applied to legacy core at lando/core#50.

netlify[bot] commented 11 months ago

Deploy request for lando-core-next pending review.

Visit the deploys page to approve it

Name Link
Latest commit b79b43115b47d30753a107ab0496394277f26b17
AaronFeledy commented 11 months ago

@pirog I just patched things up here to get the feature working, but the fact that it's still in the legacy code is bothering me. Looks like the v4 patterns would move this functionality into the utils directory and move away from lodash. Any pointers? I could also do a bit more refactoring if you've got a greater vision for how terminal parameters or passing env vars should work in v4.

pirog commented 11 months ago

@AaronFeledy i think this is good however im not quite sure where this should live yet, i suspect ultimately in @lando/cli-next which we are currently prototying in https://github.com/lando/cli/blob/main/lib/cli-next.js

im not sure we want to add it into Lando 3 proper just because it feels like it could be a pretty big change. However i would support adding it somewhere in https://github.com/lando/cli/blob/main/lib/cli-next.js so that it is available downstream. eg if you use the Lando 4 runtime (which currently uses cli-next.js) you can get the terminal sizing from the cli object when constructing the tooling environment. does that make sense?

AaronFeledy commented 2 weeks ago

Docker now manages this and Lando should not interfere. Closing in favor of lando/core#179