mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 10:41:31 +00:00
Set --quiet when run under gemini-cli
Bug: 436540341 Change-Id: Ic04ba12e0bcb926b90dd5dfbd3df4685cf59535a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6832667 Reviewed-by: Andrew Grieve <agrieve@chromium.org> Reviewed-by: Junji Watanabe <jwata@google.com> Commit-Queue: Erik Staab <estaab@chromium.org>
This commit is contained in:
@@ -252,6 +252,14 @@ def _convert_ninja_j_to_siso_flags(j_value, use_remoteexec, args):
|
||||
|
||||
|
||||
def _main_inner(input_args, build_id):
|
||||
# If running in the Gemini CLI, automatically add --quiet if it's not
|
||||
# already present to avoid filling the context window.
|
||||
if os.environ.get('GEMINI_CLI') == '1':
|
||||
if not any(arg in ('--quiet', '-q') for arg in input_args):
|
||||
print('Adding --quiet because we\'re running under gemini-cli ('
|
||||
'GEMINI_CLI=1)')
|
||||
input_args.append('--quiet')
|
||||
|
||||
# if user doesn't set PYTHONPYCACHEPREFIX and PYTHONDONTWRITEBYTECODE
|
||||
# set PYTHONDONTWRITEBYTECODE=1 not to create many *.pyc in workspace
|
||||
# and keep workspace clean.
|
||||
|
||||
Reference in New Issue
Block a user