diff --git a/apply_issue.bat b/apply_issue.bat index 2a035062b..30bc306bc 100755 --- a/apply_issue.bat +++ b/apply_issue.bat @@ -4,5 +4,9 @@ :: found in the LICENSE file. setlocal +:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used +:: standalone, but allow other PATH manipulations to take priority. +set PATH=%PATH%;%~dp0 + :: Defer control. -%~dp0python "%~dp0\apply_issue.py" %* +python "%~dp0\apply_issue.py" %* diff --git a/cit.bat b/cit.bat index 8f79044aa..82919b936 100755 --- a/cit.bat +++ b/cit.bat @@ -1,8 +1,12 @@ -@echo off -:: Copyright (c) 2015 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. -setlocal - -:: Defer control. -%~dp0python "%~dp0\cit.py" %* +@echo off +:: Copyright (c) 2015 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. +setlocal + +:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used +:: standalone, but allow other PATH manipulations to take priority. +set PATH=%PATH%;%~dp0 + +:: Defer control. +python "%~dp0\cit.py" %* diff --git a/clang-format.bat b/clang-format.bat index 884cd246a..c3bb53bc4 100644 --- a/clang-format.bat +++ b/clang-format.bat @@ -4,5 +4,9 @@ :: found in the LICENSE file. setlocal +:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used +:: standalone, but allow other PATH manipulations to take priority. +set PATH=%PATH%;%~dp0 + :: Defer control. -%~dp0python "%~dp0\clang_format.py" %* +python "%~dp0\clang_format.py" %* diff --git a/clang_format_merge_driver.bat b/clang_format_merge_driver.bat index 6f15dd749..8e614b492 100755 --- a/clang_format_merge_driver.bat +++ b/clang_format_merge_driver.bat @@ -1,8 +1,12 @@ -@echo off -:: Copyright 2016 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. -setlocal - -:: Defer control. -%~dp0python "%~dp0\clang_format_merge_driver.py" %* +@echo off +:: Copyright 2016 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. +setlocal + +:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used +:: standalone, but allow other PATH manipulations to take priority. +set PATH=%PATH%;%~dp0 + +:: Defer control. +python "%~dp0\clang_format_merge_driver.py" %* diff --git a/commit_queue.bat b/commit_queue.bat index c1babf04c..44639a64d 100755 --- a/commit_queue.bat +++ b/commit_queue.bat @@ -4,5 +4,9 @@ :: found in the LICENSE file. setlocal +:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used +:: standalone, but allow other PATH manipulations to take priority. +set PATH=%PATH%;%~dp0 + :: Defer control. -%~dp0python "%~dp0\commit_queue.py" %* +python "%~dp0\commit_queue.py" %* diff --git a/cpplint.bat b/cpplint.bat index 914eecf1a..30faf8bbb 100644 --- a/cpplint.bat +++ b/cpplint.bat @@ -1,4 +1,11 @@ @echo off +:: Copyright 2016 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. setlocal +:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used +:: standalone, but allow other PATH manipulations to take priority. +set PATH=%PATH%;%~dp0 + call python "%~dp0cpplint.py" %* diff --git a/depot-tools-auth.bat b/depot-tools-auth.bat index 4770ed6fb..37280b765 100644 --- a/depot-tools-auth.bat +++ b/depot-tools-auth.bat @@ -4,5 +4,9 @@ :: found in the LICENSE file. setlocal +:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used +:: standalone, but allow other PATH manipulations to take priority. +set PATH=%PATH%;%~dp0 + :: Defer control. -%~dp0python "%~dp0\depot-tools-auth.py" %* +python "%~dp0\depot-tools-auth.py" %* diff --git a/download_from_google_storage.bat b/download_from_google_storage.bat index 4c7971b42..f1f2d2161 100755 --- a/download_from_google_storage.bat +++ b/download_from_google_storage.bat @@ -2,6 +2,11 @@ :: Copyright (c) 2012 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. +setlocal + +:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used +:: standalone, but allow other PATH manipulations to take priority. +set PATH=%PATH%;%~dp0 :: Defer control. -%~dp0python "%~dp0\download_from_google_storage.py" %* +python "%~dp0\download_from_google_storage.py" %* diff --git a/fetch.bat b/fetch.bat index d6ea944e2..5f8019a19 100755 --- a/fetch.bat +++ b/fetch.bat @@ -7,5 +7,9 @@ setlocal :: Synchronize the root directory before deferring control back to gclient.py. call "%~dp0\update_depot_tools.bat" +:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used +:: standalone, but allow other PATH manipulations to take priority. +set PATH=%PATH%;%~dp0 + :: Defer control. -%~dp0python "%~dp0\fetch.py" %* +python "%~dp0\fetch.py" %* diff --git a/gclient.bat b/gclient.bat index d66ce6a41..3d2fe2627 100755 --- a/gclient.bat +++ b/gclient.bat @@ -7,5 +7,9 @@ setlocal :: Synchronize the root directory before deferring control back to gclient.py. call "%~dp0update_depot_tools.bat" %* +:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used +:: standalone, but allow other PATH manipulations to take priority. +set PATH=%PATH%;%~dp0 + :: Defer control. -"%~dp0python" "%~dp0gclient.py" %* +"python" "%~dp0gclient.py" %* diff --git a/gn.bat b/gn.bat index 0a42a0766..9eb6b56a1 100644 --- a/gn.bat +++ b/gn.bat @@ -4,5 +4,9 @@ :: found in the LICENSE file. setlocal +:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used +:: standalone, but allow other PATH manipulations to take priority. +set PATH=%PATH%;%~dp0 + :: Defer control. -%~dp0python "%~dp0\gn.py" %* +python "%~dp0\gn.py" %* diff --git a/roll-dep-svn.bat b/roll-dep-svn.bat index b2aec795e..6ff5db78f 100755 --- a/roll-dep-svn.bat +++ b/roll-dep-svn.bat @@ -1,7 +1,12 @@ -@echo off -:: Copyright (c) 2012 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. - -:: Defer control. -%~dp0python "%~dp0\roll_dep_svn.py" %* +@echo off +:: Copyright (c) 2012 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. +setlocal + +:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used +:: standalone, but allow other PATH manipulations to take priority. +set PATH=%PATH%;%~dp0 + +:: Defer control. +python "%~dp0\roll_dep_svn.py" %* diff --git a/roll-dep.bat b/roll-dep.bat index d5166dfa8..c49c88dc5 100755 --- a/roll-dep.bat +++ b/roll-dep.bat @@ -2,6 +2,11 @@ :: Copyright (c) 2012 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. +setlocal + +:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used +:: standalone, but allow other PATH manipulations to take priority. +set PATH=%PATH%;%~dp0 :: Defer control. -%~dp0python "%~dp0\roll_dep.py" %* +python "%~dp0\roll_dep.py" %*