Skip to content

Commit b7aae9b

Browse files
authored
Allow "NO TTY" mode for make commands (#282)
1 parent d752f00 commit b7aae9b

2 files changed

Lines changed: 32 additions & 1 deletion

File tree

AGENTS.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# AGENTS.md
2+
3+
Guidelines for AI agents working in this repository.
4+
5+
## Commands
6+
7+
All commands are executed via `make`.
8+
9+
```bash
10+
make <target> [VARIABLE=value ...]
11+
```
12+
13+
### Variables
14+
15+
| Variable | Description |
16+
|---|---|
17+
| `NO_TTY=1` | **Always pass this** — there is no interactive terminal |
18+
| `ARGS="..."` | Extra arguments passed to the underlying tool |
19+
| `PHP_VERSION=8.3` | Override PHP version (default: 8.4) |
20+
21+
### Targets
22+
23+
| Target | Description |
24+
|---|---|
25+
| `make test` | Run PHPUnit tests (alias for `make phpunit`) |
26+
| `make phpunit` | Run PHPUnit tests |
27+
| `make coverage` | Generate HTML coverage report to `runtime/coverage/` |
28+
| `make infection` | Run mutation testing with Infection (alias: `make mutation`) |
29+
| `make psalm` | Run Psalm static analysis |
30+
| `make php-cs-fixer` | Fix code style with PHP-CS-Fixer (alias: `make cs-fix`) |
31+
| `make composer` | Run Composer |

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
PHP_VERSION ?= 8.4
44
-include .env.local
55

6-
DOCKER_RUN := docker run --rm -it \
6+
DOCKER_RUN := docker run --rm $(if $(NO_TTY),,-it) \
77
--init \
88
--user $(shell id -u):$(shell id -g) \
99
--env YII_INSIDE_CONTAINER=true \

0 commit comments

Comments
 (0)