diff --git a/CHANGELOG.md b/CHANGELOG.md index c6434ff5f..13b5934d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }}) +* Disabled `DOCKER_CLI_HINTS` on `lando` +* Fixed bug causing some `lando exec` and tooling commands from not inheriting terminal columns and lines correctly[#277](https://github.com/lando/core/issues/277) +* Standardized non-TTY renderer selection to the `simple` renderer + ## v3.23.14 - [November 27, 2024](https://github.com/lando/core/releases/tag/v3.23.14) ### New Features & Improvements diff --git a/docs/.vitepress/config.mjs b/docs/.vitepress/config.mjs index 8ef23ba71..4d118a633 100644 --- a/docs/.vitepress/config.mjs +++ b/docs/.vitepress/config.mjs @@ -157,7 +157,9 @@ function rootBar() { {text: 'macOS', link: '/install/macos.html'}, {text: 'Linux', link: '/install/linux.html'}, {text: 'Windows', link: '/install/windows.html'}, + {text: 'WSL', link: '/install/wsl.html'}, {text: 'GitHub Actions', link: '/install/gha.html'}, + {text: 'CircleCI', link: '/install/circleci.html'}, {text: 'Source', link: '/install/source.html'}, ], }, diff --git a/docs/install/circleci.md b/docs/install/circleci.md new file mode 100644 index 000000000..d34678b68 --- /dev/null +++ b/docs/install/circleci.md @@ -0,0 +1,11 @@ +--- +title: GitHub Actions +description: Install Lando on CircleCI + +url-loader: + source: https://raw.githubusercontent.com/lando/setup-lando/refs/heads/main/docs/circleci.md + content: replace + frontmatter: false +editLink: + url: https://github.com/lando/setup-lando/edit/main/docs/circleci.md +--- diff --git a/docs/install/wsl.md b/docs/install/wsl.md new file mode 100644 index 000000000..6c480807b --- /dev/null +++ b/docs/install/wsl.md @@ -0,0 +1,11 @@ +--- +title: WSL +description: Install Lando on Windows Subsystem for Linux + +url-loader: + source: https://raw.githubusercontent.com/lando/setup-lando/refs/heads/main/docs/wsl.md + content: replace + frontmatter: false +editLink: + url: https://github.com/lando/setup-lando/edit/main/docs/wsl.md +--- diff --git a/examples/exec/README.md b/examples/exec/README.md index 47e490a2b..96b9e35a5 100644 --- a/examples/exec/README.md +++ b/examples/exec/README.md @@ -91,6 +91,10 @@ lando exec web4 -- "mkdir -p /usr/share/nginx/html/test && echo hellothere > /us lando exec web4 -- "mkdir -p /usr/share/nginx/html/test && echo -n hello >> /usr/share/nginx/html/test/msg2 && echo there >> /usr/share/nginx/html/test/msg2 && cat /usr/share/nginx/html/test/msg2" | grep hellothere lando exec web4 -- "cat < /usr/share/nginx/html/test/msg2" | grep hellothere lando exec web4 -- "echo hellothere &> /dev/null" | grep hellothere || echo $? || echo 1 + +# Should inherit users terminal cols and rows +lando exec web -- "tput cols | grep $(tput cols)" +lando exec web -- "tput lines | grep $(tput lines)" ``` ## Destroy tests diff --git a/examples/ssh/README.md b/examples/ssh/README.md index 0187d5376..888e05d5f 100644 --- a/examples/ssh/README.md +++ b/examples/ssh/README.md @@ -58,6 +58,10 @@ lando ssh -s alpine -u root -c "ps a" | grep "sleep infinity" lando ssh -s web2 -u root -c "ps -e -o cmd" | grep "sleep infinity" lando ssh -s web3 -u root -c "ps -e -o cmd" | grep "sleep infinity" lando ssh -s web4 -u root -c "ps -e -o cmd" | grep "sleep infinity" + +# Should inherit users terminal cols and rows +lando ssh -s web -c "tput cols | grep $(tput cols)" +lando ssh -s web -c "tput lines | grep $(tput lines)" ``` ## Destroy tests diff --git a/examples/tooling/.gitignore b/examples/tooling/.gitignore index 2211df63d..210b0d027 100644 --- a/examples/tooling/.gitignore +++ b/examples/tooling/.gitignore @@ -1 +1,3 @@ *.txt +cols +lines diff --git a/examples/tooling/.lando.yml b/examples/tooling/.lando.yml index 1d945dcd6..66d5d8c74 100644 --- a/examples/tooling/.lando.yml +++ b/examples/tooling/.lando.yml @@ -186,6 +186,12 @@ tooling: l4env: service: lando4 cmd: env + cols: + service: lando4 + cmd: sh -c "tput cols > cols" + lines: + service: lando4 + cmd: sh -c "tput lines > lines" listfiles: service: web cmd: ls -lsa /app/* @@ -235,7 +241,7 @@ tooling: - s describe: Runs in this service bad-tool: disabled - naughty-tool: false + naughty-tool: fals everything: cmd: /app/args.sh service: node diff --git a/examples/tooling/README.md b/examples/tooling/README.md index f4fd5fa7c..e8991e604 100644 --- a/examples/tooling/README.md +++ b/examples/tooling/README.md @@ -161,6 +161,12 @@ lando everything --help | grep "lando this is just for testing" # Should be able to run even if options are empty lando emptyopter + +# Should inherit users terminal cols and rows +lando cols +lando lines +cat cols | grep "$(tput cols)" +cat lines | grep "$(tput lines)" ``` ## Destroy tests diff --git a/tasks/exec.js b/tasks/exec.js index d43d8d64c..89385aaae 100644 --- a/tasks/exec.js +++ b/tasks/exec.js @@ -137,7 +137,7 @@ module.exports = (lando, config = lando.appConfig) => ({ // try to run it try { lando.log.debug('running exec command %o on %o', runner.cmd, runner.id); - await require('../utils/build-docker-exec')(lando, ['inherit', 'pipe', 'pipe'], runner); + await require('../utils/build-docker-exec')(lando, 'inherit', runner); // error } catch (error) { diff --git a/utils/build-config.js b/utils/build-config.js index e417054fb..39cf1db1f 100644 --- a/utils/build-config.js +++ b/utils/build-config.js @@ -67,6 +67,8 @@ module.exports = options => { config.engineConfig = getEngineConfig(config); // Strip all COMPOSE_ envvars config.env = stripEnv('COMPOSE_'); + // Disable docker CLI_HINTS + config.env.DOCKER_CLI_HINTS = false; // if composeBin is set and orchestratorBin is not set then set one to the other if (config.composeBin && !config.orchestratorBin) config.orchestratorBin = config.composeBin; diff --git a/utils/get-tooling-defaults.js b/utils/get-tooling-defaults.js index f663a9d85..73d24fe0f 100644 --- a/utils/get-tooling-defaults.js +++ b/utils/get-tooling-defaults.js @@ -12,7 +12,7 @@ module.exports = ({ env = {}, options = {}, service = '', - stdio = ['inherit', 'pipe', 'pipe'], + stdio = 'inherit', user = null, } = {}) => ({ diff --git a/utils/run-tasks.js b/utils/run-tasks.js index 03332c19a..9d01c173e 100644 --- a/utils/run-tasks.js +++ b/utils/run-tasks.js @@ -36,7 +36,8 @@ module.exports = async (tasks, { } // some sitautions just need the bare minimum - if (process?.env?.TERM === 'dumb' || process?.env?.CIRCLECI) renderer = 'verbose'; + if (process?.env?.TERM === 'dumb') renderer = 'simple'; + if (process?.env?.CI && !require('is-interactive')()) renderer = 'simple'; const defaults = { ctx: {data: {}, errors: [], results: [], skipped: 0, ran: 0, total: 0},