Commit ea65b841 authored by Dirk Pranke's avatar Dirk Pranke Committed by LUCI CQ

Fix python3 wrapper for msys.

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/+/2721367Reviewed-by: 's avatarEdward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@google.com>
parent 70405c2f
......@@ -2,6 +2,11 @@
DEPOT_TOOLS=$(dirname "$0")/..
PYTHON3_BIN_DIR="$DEPOT_TOOLS/$(cat $DEPOT_TOOLS/python3_bin_reldir.txt | xargs echo)"
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" "$@"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment