Skip to content
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

Pirog12224 #283

Merged
merged 6 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions docs/.vitepress/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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'},
],
},
Expand Down
11 changes: 11 additions & 0 deletions docs/install/circleci.md
Original file line number Diff line number Diff line change
@@ -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
---
11 changes: 11 additions & 0 deletions docs/install/wsl.md
Original file line number Diff line number Diff line change
@@ -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
---
4 changes: 4 additions & 0 deletions examples/exec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions examples/ssh/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions examples/tooling/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
*.txt
cols
lines
8 changes: 7 additions & 1 deletion examples/tooling/.lando.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/*
Expand Down Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions examples/tooling/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tasks/exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 2 additions & 0 deletions utils/build-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion utils/get-tooling-defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = ({
env = {},
options = {},
service = '',
stdio = ['inherit', 'pipe', 'pipe'],
stdio = 'inherit',
user = null,
} = {}) =>
({
Expand Down
3 changes: 2 additions & 1 deletion utils/run-tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
Loading