-
Notifications
You must be signed in to change notification settings - Fork 1.8k
SC2114
koalaman edited this page Jan 25, 2015
·
4 revisions
rm -rf /usr /lib/nvidia-current/xorg/xorg
rm -rf /usr/lib/nvidia-current/xorg/xorg
The example line of code was an actual bug in the Bumblebee NVIDIA driver.
Due to an accidental space, it deleted /usr
instead of just the particular directory.
In cases of chroot, initramfs and similar, it's reasonable to delete otherwise important directories. Due to this, Shellcheck will not warn if the command contains --
:
rm -rf -- /usr
This is an arbitrary convention to allow deleting such directories without having to use a directive to silence the warning.