[DRE-commits] [gitlab] 01/02: Quote variable for test -n calls

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Fri Apr 21 10:37:29 UTC 2017


This is an automated email from the git hooks/post-receive script.

praveen pushed a commit to branch master
in repository gitlab.

commit ac68fae02ef85c419f8863e6f05334f4cef17843
Author: Benjamin Drung <bdrung at debian.org>
Date:   Fri Apr 21 12:10:44 2017 +0200

    Quote variable for test -n calls
    
    $ test -n; echo $?
    0
    $ test -n ""; echo $?
    1
---
 debian/postrm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/debian/postrm b/debian/postrm
index a90decd..87340ef 100644
--- a/debian/postrm
+++ b/debian/postrm
@@ -23,7 +23,7 @@ if [ -f ${gitlab_debian_defaults} ]; then . ${gitlab_debian_defaults}; fi
 
 safely_remove() {
   CANDIDATE_DIR=$1
-  if [ -n ${CANDIDATE_DIR} ];then
+  if [ -n "${CANDIDATE_DIR}" ];then
     if [ -e ${CANDIDATE_DIR} ]; then
       echo "Removing $i..."
       rm -rf ${CANDIDATE_DIR}
@@ -117,7 +117,7 @@ ${gitlab_tmpfiles} ${gitlab_shell_config}; do
     done
 
     # remove generated assets
-    if [ -n ${gitlab_data_dir} ]; then safely_remove ${gitlab_data_dir}/public/assets; fi
+    if [ -n "${gitlab_data_dir}" ]; then safely_remove ${gitlab_data_dir}/public/assets; fi
       
     # Remove private copies of configuration files
     rm -f ${nginx_site_private}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/gitlab.git



More information about the Pkg-ruby-extras-commits mailing list