We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b949fef commit 2e02bf1Copy full SHA for 2e02bf1
tools/clean.sh
@@ -138,6 +138,11 @@ if [[ ! -v work_dir ]] && [[ "${work_dir}" = "" ]]; then
138
exit 1
139
fi
140
141
+# Check root.
142
+if (( ! "${EUID}" == 0 )); then
143
+ msg_error "This script must be run as root." "1"
144
+fi
145
+
146
if [[ ! "${noconfirm}" = true ]] && (( "$(find "${work_dir}" -type f 2> /dev/null | wc -l)" != 0 )); then
147
msg_warn "Forcibly unmount all devices mounted under the following directories and delete them recursively."
148
msg_warn "${work_dir}"
0 commit comments