Kaynağa Gözat

Fix: soong_ui.bash's wrong check for TOP variable

soong_ui.bash defines `gettop` function and it finds top of the source
tree. It also checks if `TOP` is properly set and if set use it.
However its check was using the wrong operator (`-z`) for it.

Test: m -j
Change-Id: Ie86dc340a9f89f45ff0828ea43f6afa3713bda76
Jooyung Han 5 yıl önce
ebeveyn
işleme
e9793a7e82
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      soong_ui.bash

+ 1 - 1
soong_ui.bash

@@ -23,7 +23,7 @@ export TRACE_BEGIN_SOONG=$(date +%s%N)
 function gettop
 {
     local TOPFILE=build/soong/root.bp
-    if [ -z "${TOP-}" -a -f "${TOP-}/${TOPFILE}" ] ; then
+    if [ -n "${TOP-}" -a -f "${TOP-}/${TOPFILE}" ] ; then
         # The following circumlocution ensures we remove symlinks from TOP.
         (cd $TOP; PWD= /bin/pwd)
     else