Kaynağa Gözat

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 <ehmaldonado@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Edward Lesmes 5 yıl önce
ebeveyn
işleme
648b4cd2ca

+ 1 - 1
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)"

+ 1 - 1
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)"

+ 1 - 1
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)"

+ 1 - 1
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)"

+ 1 - 1
git-freeze

@@ -5,4 +5,4 @@
 
 SCRIPT=git_freezer.py
 set -- freeze "$@"
-. $(type -P python_runner.sh)
+. "$(type -P python_runner.sh)"

+ 1 - 1
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)"

+ 1 - 1
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)"

+ 1 - 1
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)"

+ 1 - 1
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)"

+ 1 - 1
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)"

+ 1 - 1
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)"

+ 1 - 1
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)"

+ 1 - 1
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)"

+ 1 - 1
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)"

+ 1 - 1
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)"

+ 1 - 1
git-retry

@@ -5,4 +5,4 @@
 
 SCRIPT=git_retry.py
 set -- retry "$@"
-. $(type -P python_runner.sh)
+. "$(type -P python_runner.sh)"

+ 1 - 1
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)"

+ 1 - 1
git-thaw

@@ -10,4 +10,4 @@
 
 SCRIPT=git_freezer.py
 set -- thaw "$@"
-. $(type -P python_runner.sh)
+. "$(type -P python_runner.sh)"

+ 1 - 1
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)"

+ 1 - 1
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