mirror of
https://github.com/opdavies/build-configs.git
synced 2025-01-22 18:27:31 +00:00
Fix TTY
in run
files for Drupal projects
This commit is contained in:
parent
0d622d3121
commit
58e454b2c2
|
@ -1,5 +1,11 @@
|
|||
# Changelog
|
||||
|
||||
## 2023-12-15
|
||||
|
||||
### Fixed
|
||||
|
||||
* Make `TTY` configurable in `run` files for Drupal projects.
|
||||
|
||||
## 2023-11-24
|
||||
|
||||
### Changed
|
||||
|
|
|
@ -5,6 +5,13 @@
|
|||
set -o errexit
|
||||
set -o pipefail
|
||||
|
||||
# If we're running in CI we need to disable TTY allocation for docker compose
|
||||
# commands that enable it by default, such as exec and run.
|
||||
TTY="${TTY:-}"
|
||||
if [[ ! -t 1 ]]; then
|
||||
TTY="-T"
|
||||
fi
|
||||
|
||||
# Run automated tests as part of the Continuous Integration (CI) pipeline.
|
||||
function ci:test {
|
||||
lint:dockerfile
|
||||
|
@ -116,7 +123,7 @@ function test:commit {
|
|||
}
|
||||
|
||||
function _exec {
|
||||
docker compose exec -T "${@}"
|
||||
docker compose exec ${TTY} "${@}"
|
||||
}
|
||||
|
||||
function _run {
|
||||
|
@ -127,7 +134,7 @@ function _run {
|
|||
--entrypoint "${command}" \
|
||||
--no-deps \
|
||||
--rm \
|
||||
-T \
|
||||
${TTY} \
|
||||
"${service}" "${@}"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue