diff --git a/update b/update
index 476cbdb..056fdab 100755
--- a/update
+++ b/update
@@ -11,7 +11,6 @@ update() {
   
   if [ ${status} -ne 0 ]; then
   	echo "Failed to get pad at ${url}"
-  	exit ${status}
   else
   	git -C "${gitdir}" add "${dst}"
   	changes=$(git -C "${gitdir}" diff --cached | wc -l)
@@ -25,6 +24,13 @@ update() {
   git -C "${gitdir}" reset --hard HEAD
 }
 
-while read -r pad; do
+if ! git rev-parse --is-inside-work-tree
+then
+  echo "Not a working directory"
+  exit 1
+fi
+
+while read -r pad
+do
   update "$pad"
 done