diff --git a/CHANGELOG.md b/CHANGELOG.md index 5214cc4..4a93f9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 2024-09-24 +### Added +- Print warning when running `bin/up` without detach mode + ## 2024-09-11 ### Added - Add loud warning to `bin/doctor` when not using Sandboxed Compiles/`SIBLING_CONTAINERS_ENABLED=true` diff --git a/bin/up b/bin/up index 6efb621..0d5ff8c 100755 --- a/bin/up +++ b/bin/up @@ -69,6 +69,24 @@ function pull_sandboxed_compiles() { done } +function notify_about_not_using_detach_mode() { + local detached=false + for arg in "$@"; do + case "$arg" in + -d|--detach) detached=true;; + esac + done + if [[ "$detached" == false ]]; then + echo + echo '---' + echo + echo ' NOTICE: You are running "bin/up" without the detach mode ("-d" or "--detach" option). Behind the scenes, we will invoke "docker compose up", which will tail the container logs indefinitely until you issue a keyboard interrupt (CTRL+C).' + echo + echo '---' + echo + fi +} + function __main__() { if [[ "${1:-null}" == "help" ]] || [[ "${1:-null}" == "--help" ]]; then usage @@ -88,6 +106,7 @@ function __main__() { pull_sandboxed_compiles fi + notify_about_not_using_detach_mode "$@" exec "$TOOLKIT_ROOT/bin/docker-compose" up "$@" }