mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
Don't write pyc files if running from Cog
Many tools use vpython so we can avoid pyc writes by disabling them at this layer. Bug: b/320565954 Change-Id: I50cd04968810ecc186d5abe6c67e54ae1647c739 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5812665 Commit-Queue: Erik Staab <estaab@chromium.org> Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
This commit is contained in:
5
vpython3
5
vpython3
@@ -37,6 +37,11 @@ fi
|
||||
export DEPOT_TOOLS_DIR="${DEPOT_TOOLS_DIR:-$(dirname "$0")}"
|
||||
export DEPOT_TOOLS_UNAME_S="${DEPOT_TOOLS_UNAME_S:-$(uname -s | tr '[:upper:]' '[:lower:]')}"
|
||||
|
||||
# Don't write pyc files if running from a Cog workspace.
|
||||
if [[ "$(pwd)" == "/google/cog/"* ]]; then
|
||||
export PYTHONDONTWRITEBYTECODE=1
|
||||
fi
|
||||
|
||||
source "${DEPOT_TOOLS_DIR}/cipd_bin_setup.sh"
|
||||
CIPD_ROOT=$(cipd_bin_setup) &> /dev/null
|
||||
|
||||
|
||||
Reference in New Issue
Block a user