Quote variable for test -n calls
$ test -n; echo $? 0 $ test -n ""; echo $? 1
This commit is contained in:
parent
54f0d8896a
commit
ac68fae02e
1 changed files with 2 additions and 2 deletions
4
debian/postrm
vendored
4
debian/postrm
vendored
|
@ -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}
|
||||
|
|
Loading…
Reference in a new issue