From: Mike Frysinger Date: Wed, 29 Nov 2017 16:56:31 +0000 (-0800) Subject: repo: fix loop when repo is not installed X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=eee212f80e5aab834261614fd2a0b14829c09765;p=home.git repo: fix loop when repo is not installed --- diff --git a/.bin/r b/.bin/r index 24fc5e4..dd4cd6b 100755 --- 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}"