From cbf84c1840fecce74b8554058aa32e9b8b4dfd18 Mon Sep 17 00:00:00 2001 From: bcambl Date: Thu, 22 Dec 2016 04:32:42 -0600 Subject: [PATCH] replace subshell with command chain --- automated install/basic-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 9b19c19f..bb2de017 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -135,8 +135,8 @@ fi is_repo() { # Use git to check if directory is currently under VCS, return the value local directory="${1}" - (cd ${directory} && git status --short) &> /dev/null - return + curdir=$PWD; cd $directory; git status --short &> /dev/null; rc=$?; cd $curdir + return $rc } make_repo() {