From 3e477e57c13f68fb30c454b9ed315e1ca972bafb Mon Sep 17 00:00:00 2001 From: Liu Zheng Date: Thu, 16 Apr 2026 19:39:25 +0800 Subject: [PATCH] chore: add quotes to rm command in postrm script Quote variables in rm -rf command to prevent globbing and word splitting, addressing shellcheck SC2086 warning for safer package removal. log: add quotes to rm command in postrm script --- debian/deepin-terminal.postrm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/deepin-terminal.postrm b/debian/deepin-terminal.postrm index cbdefaa31..c9ced245d 100644 --- a/debian/deepin-terminal.postrm +++ b/debian/deepin-terminal.postrm @@ -4,8 +4,8 @@ #DEBHELPER# userName=$(who) -if [ $1 = "purge" ]; then - rm -rf /home/${userName%% *}/.config/deepin/deepin-terminal/* +if [ "$1" = "purge" ]; then + rm -rf "/home/${userName%% *}/.config/deepin/deepin-terminal/"* #解决安装终端后/nonexistent目录下会残留install_flag配置文件的问题 if [ -f /nonexistent/.config/deepin/deepin-terminal/install_flag ]