aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bash/bashrc.d/prompt.bash10
1 files changed, 5 insertions, 5 deletions
diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash
index 2a21cb1d..1f2e1b8f 100644
--- a/bash/bashrc.d/prompt.bash
+++ b/bash/bashrc.d/prompt.bash
@@ -141,11 +141,6 @@ prompt() {
return 1
fi
- # Exit if not inside a Subversion working copy
- if ! svn info >/dev/null 2>&1; then
- return 1
- fi
-
# Determine the repository URL and root directory
local url root
while IFS=: read key value; do
@@ -159,6 +154,11 @@ prompt() {
esac
done < <(svn info 2>/dev/null)
+ # Exit if we couldn't get either
+ if ! [[ $url && $root ]]; then
+ return 1
+ fi
+
# Remove the root from the URL to get what's hopefully the branch
# name, removing leading slashes and the 'branches' prefix, and any
# trailing content after a slash