mirror of
https://github.com/overleaf/toolkit.git
synced 2025-04-18 14:58:21 +02:00
Print warning when running "bin/up" without detach mode (#292)
This commit is contained in:
parent
188a5c48df
commit
233354d840
2 changed files with 23 additions and 0 deletions
|
@ -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`
|
||||
|
|
19
bin/up
19
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 "$@"
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue