You've already forked depot_tools

Don't call ensure_bootstrap from update_depot_tools. ensure_bootstrap also updates gsutil and all versions of pylint which is slow, particularly on MinGW. Original change's description: > depot_tools: Bootstrap Python 3 on Linux/Mac > > This will make it possible for developers to execute depot_tools > scripts using Python 3 in a known environment. > > Bug: 1002153 > Change-Id: I5ff492a49d227c1b5876f49adba020f51a575bdd > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1762664 > Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org> > Reviewed-by: Dirk Pranke <dpranke@chromium.org> > Reviewed-by: Andrii Shyshkalov <tandrii@google.com> Bug: 1002153 Change-Id: Ia7579e440438897ba4a7c65a8b228dcfe7f28c86 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1810040 Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org> Reviewed-by: Dirk Pranke <dpranke@chromium.org> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
21 lines
609 B
Bash
Executable File
21 lines
609 B
Bash
Executable File
#!/bin/bash
|
|
# This alias allows invocations of `python` to work as expected under msys bash.
|
|
# In particular, it detects if stdout+stdin are both attached to a pseudo-tty,
|
|
# and if so, invokes python in interactive mode. If this is not the case, or
|
|
# the user passes any arguments, python will be invoked unmodified.
|
|
python() {
|
|
if [[ $# > 0 ]]; then
|
|
python.exe "$@"
|
|
else
|
|
readlink /proc/$$/fd/0 | grep pty > /dev/null
|
|
TTY0=$?
|
|
readlink /proc/$$/fd/1 | grep pty > /dev/null
|
|
TTY1=$?
|
|
if [ $TTY0 == 0 ] && [ $TTY1 == 0 ]; then
|
|
python.exe -i
|
|
else
|
|
python.exe
|
|
fi
|
|
fi
|
|
}
|