]> git.wh0rd.org Git - home.git/commitdiff
repo: fix loop when repo is not installed
authorMike Frysinger <vapier@gentoo.org>
Wed, 29 Nov 2017 16:56:31 +0000 (08:56 -0800)
committerMike Frysinger <vapier@gentoo.org>
Wed, 29 Nov 2017 16:56:31 +0000 (08:56 -0800)
.bin/r

diff --git a/.bin/r b/.bin/r
index 24fc5e4090645fdbb32d926cbfecef8fa8544e90..dd4cd6b8e56670e078f247f563b767c6e3ca04b3 100755 (executable)
--- a/.bin/r
+++ b/.bin/r
@@ -54,7 +54,7 @@ mj_finish() {
 
 repo_root() {
        local root=${PWD}
-       while [[ ! -d ${root}/.repo && ${root} != "/" ]] ; do
+       while [[ ! -d ${root}/.repo && ${root:-/} != "/" ]] ; do
                root=${root%/*}
        done
        echo "${root}"