From 648b4cd2ca1fd753a9d56c2f412b5eebe0e956b9 Mon Sep 17 00:00:00 2001 From: Edward Lesmes Date: Mon, 30 Mar 2020 19:06:13 +0000 Subject: [PATCH] Add quotes around paths in bash scripts Follow up to crrev.com/c/2125626. This allows depot_tools commands to run successfully when depot_tools is installed in a path containing spaces. Change-Id: I8f99dbdcb3b1acf27d51ce26b6153f643b8d4dcd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2127675 Commit-Queue: Edward Lesmes Reviewed-by: Josip Sokcevic --- git-cache | 2 +- git-drover | 2 +- git-find-releases | 2 +- git-footers | 2 +- git-freeze | 2 +- git-hyper-blame | 2 +- git-map | 2 +- git-map-branches | 2 +- git-mark-merge-base | 2 +- git-nav-downstream | 2 +- git-new-branch | 2 +- git-number | 2 +- git-rebase-update | 2 +- git-rename-branch | 2 +- git-reparent-branch | 2 +- git-retry | 2 +- git-squash-branch | 2 +- git-thaw | 2 +- git-upstream-diff | 2 +- update_depot_tools | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/git-cache b/git-cache index 6b1a88a79f..d633e42093 100755 --- a/git-cache +++ b/git-cache @@ -3,4 +3,4 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -. $(type -P python_runner.sh) +. "$(type -P python_runner.sh)" diff --git a/git-drover b/git-drover index 817b6b8dcf..02b9138f3b 100755 --- a/git-drover +++ b/git-drover @@ -3,4 +3,4 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -. $(type -P python_runner.sh) +. "$(type -P python_runner.sh)" diff --git a/git-find-releases b/git-find-releases index 6b1a88a79f..d633e42093 100755 --- a/git-find-releases +++ b/git-find-releases @@ -3,4 +3,4 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -. $(type -P python_runner.sh) +. "$(type -P python_runner.sh)" diff --git a/git-footers b/git-footers index 6b1a88a79f..d633e42093 100755 --- a/git-footers +++ b/git-footers @@ -3,4 +3,4 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -. $(type -P python_runner.sh) +. "$(type -P python_runner.sh)" diff --git a/git-freeze b/git-freeze index ffba0cbe77..7398c5f193 100755 --- a/git-freeze +++ b/git-freeze @@ -5,4 +5,4 @@ SCRIPT=git_freezer.py set -- freeze "$@" -. $(type -P python_runner.sh) +. "$(type -P python_runner.sh)" diff --git a/git-hyper-blame b/git-hyper-blame index 4abb969a88..69ce99db70 100755 --- a/git-hyper-blame +++ b/git-hyper-blame @@ -3,4 +3,4 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -. $(type -P python_runner.sh) +. "$(type -P python_runner.sh)" diff --git a/git-map b/git-map index 6b1a88a79f..d633e42093 100755 --- a/git-map +++ b/git-map @@ -3,4 +3,4 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -. $(type -P python_runner.sh) +. "$(type -P python_runner.sh)" diff --git a/git-map-branches b/git-map-branches index 6b1a88a79f..d633e42093 100755 --- a/git-map-branches +++ b/git-map-branches @@ -3,4 +3,4 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -. $(type -P python_runner.sh) +. "$(type -P python_runner.sh)" diff --git a/git-mark-merge-base b/git-mark-merge-base index 6b1a88a79f..d633e42093 100755 --- a/git-mark-merge-base +++ b/git-mark-merge-base @@ -3,4 +3,4 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -. $(type -P python_runner.sh) +. "$(type -P python_runner.sh)" diff --git a/git-nav-downstream b/git-nav-downstream index 6b1a88a79f..d633e42093 100755 --- a/git-nav-downstream +++ b/git-nav-downstream @@ -3,4 +3,4 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -. $(type -P python_runner.sh) +. "$(type -P python_runner.sh)" diff --git a/git-new-branch b/git-new-branch index 6b1a88a79f..d633e42093 100755 --- a/git-new-branch +++ b/git-new-branch @@ -3,4 +3,4 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -. $(type -P python_runner.sh) +. "$(type -P python_runner.sh)" diff --git a/git-number b/git-number index 2b9c996d71..d0c30df67e 100755 --- a/git-number +++ b/git-number @@ -3,4 +3,4 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -. $(type -P python_runner.sh) +. "$(type -P python_runner.sh)" diff --git a/git-rebase-update b/git-rebase-update index 6b1a88a79f..d633e42093 100755 --- a/git-rebase-update +++ b/git-rebase-update @@ -3,4 +3,4 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -. $(type -P python_runner.sh) +. "$(type -P python_runner.sh)" diff --git a/git-rename-branch b/git-rename-branch index 6b1a88a79f..d633e42093 100755 --- a/git-rename-branch +++ b/git-rename-branch @@ -3,4 +3,4 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -. $(type -P python_runner.sh) +. "$(type -P python_runner.sh)" diff --git a/git-reparent-branch b/git-reparent-branch index 6b1a88a79f..d633e42093 100755 --- a/git-reparent-branch +++ b/git-reparent-branch @@ -3,4 +3,4 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -. $(type -P python_runner.sh) +. "$(type -P python_runner.sh)" diff --git a/git-retry b/git-retry index 014743a6a2..ac201c6bdf 100755 --- a/git-retry +++ b/git-retry @@ -5,4 +5,4 @@ SCRIPT=git_retry.py set -- retry "$@" -. $(type -P python_runner.sh) +. "$(type -P python_runner.sh)" diff --git a/git-squash-branch b/git-squash-branch index 6b1a88a79f..d633e42093 100755 --- a/git-squash-branch +++ b/git-squash-branch @@ -3,4 +3,4 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -. $(type -P python_runner.sh) +. "$(type -P python_runner.sh)" diff --git a/git-thaw b/git-thaw index 8f6a4e3646..2e0c4865ae 100755 --- a/git-thaw +++ b/git-thaw @@ -10,4 +10,4 @@ SCRIPT=git_freezer.py set -- thaw "$@" -. $(type -P python_runner.sh) +. "$(type -P python_runner.sh)" diff --git a/git-upstream-diff b/git-upstream-diff index ba16876d04..08cad36b34 100755 --- a/git-upstream-diff +++ b/git-upstream-diff @@ -6,4 +6,4 @@ # git_upstream_diff.py -- Provide the diff between the current branch and its # upstream. -. $(type -P python_runner.sh) +. "$(type -P python_runner.sh)" diff --git a/update_depot_tools b/update_depot_tools index 20d33738a2..417b15d5a4 100755 --- a/update_depot_tools +++ b/update_depot_tools @@ -119,7 +119,7 @@ function update_git_repo { # Update git checkouts. if [ "X$DEPOT_TOOLS_UPDATE" != "X0" ]; then if [ -e "$base_dir/.git" ]; then - cd $base_dir + cd "$base_dir" update_git_repo cd - > /dev/null fi