diff --git a/fetch b/fetch index bea6718c77..14a142791b 100755 --- a/fetch +++ b/fetch @@ -5,4 +5,8 @@ base_dir=$(dirname "$0") -PYTHONDONTWRITEBYTECODE=1 exec python "$base_dir/fetch.py" "$@" +# Ensure that "depot_tools" is somewhere in PATH so this tool can be used +# standalone, but allow other PATH manipulations to take priority. +PATH=$PATH:$base_dir + +PYTHONDONTWRITEBYTECODE=1 exec vpython "$base_dir/fetch.py" "$@" diff --git a/fetch.bat b/fetch.bat index 5f8019a19d..6afd53092c 100755 --- a/fetch.bat +++ b/fetch.bat @@ -12,4 +12,4 @@ call "%~dp0\update_depot_tools.bat" set PATH=%PATH%;%~dp0 :: Defer control. -python "%~dp0\fetch.py" %* +vpython "%~dp0\fetch.py" %* diff --git a/fetch.py b/fetch.py index 56abfb9a6d..72e52c7967 100755 --- a/fetch.py +++ b/fetch.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env vpython # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.