mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
The python3_bin_reldir.txt path to find the python binary will contain backslashes instead of forward slashes on windows, so this tweaks the wrapper in //python-bin/python3 to handle that and start working under msys. Bug: 1168365 Change-Id: I0c83f36f48f229276803c2e5d73ec86ecb55ada1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2721367 Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org> Commit-Queue: Dirk Pranke <dpranke@google.com>
13 lines
349 B
Bash
Executable File
13 lines
349 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
DEPOT_TOOLS=$(dirname "$0")/..
|
|
|
|
if [ "$OSTYPE" = "msys" ]
|
|
then
|
|
PYTHON3_BIN_DIR="$DEPOT_TOOLS/$(sed -e 's-\\-/-g' $DEPOT_TOOLS/python3_bin_reldir.txt)"
|
|
else
|
|
PYTHON3_BIN_DIR="$DEPOT_TOOLS/$(cat $DEPOT_TOOLS/python3_bin_reldir.txt)"
|
|
fi
|
|
PATH="$PYTHON3_BIN_DIR":"$PYTHON3_BIN_DIR/Scripts":"$PATH"
|
|
"$PYTHON3_BIN_DIR/python3" "$@"
|