diff --git a/vcsh b/vcsh
index 0feb17af0f23bffb1d5a74b4888147a2bdb062d0..fdfeb845e8aec4db1c60c1c7101f745e497f7252 100755
--- a/vcsh
+++ b/vcsh
@@ -213,8 +213,8 @@ write_gitignore() {
 		fatal "could not move '$tempfile' to '$VCSH_BASE/.gitignore.d/$VCSH_REPO_NAME'" 53
 }
 
-if [ ! x$VCSH_GITIGNORE = x'exact' ] && [ ! x$VCSH_GITIGNORE = x'recursive' ]; then
-	fatal "\$VCSH_GITIGNORE must be either 'exact' or 'recursive'" 1
+if [ ! "x$VCSH_GITIGNORE" = 'xexact' ] && [ ! "x$VCSH_GITIGNORE" = 'xrecursive' ]; then
+	fatal "'\$VCSH_GITIGNORE' must be either 'exact' or 'recursive'" 1
 fi
 
 if [ "$1" = 'clone' ]; then