lando / core-next

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

Pass terminal dimensions into container #42

Closed AaronFeledy closed 5 months ago

AaronFeledy commented 1 year 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 1 year ago

Deploy Preview for lando-core-next failed. Why did it fail? →

Name Link
Latest commit b79b43115b47d30753a107ab0496394277f26b17
Latest deploy log https://app.netlify.com/sites/lando-core-next/deploys/64c4ce7f255c0f0008498f99
AaronFeledy commented 1 year 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 1 year 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 5 months ago

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