-
Notifications
You must be signed in to change notification settings - Fork 1.8k
SC2114
haruna edited this page May 20, 2021
·
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.
If you do intend to delete a system directory, such as when working in a chroot or initramfs, you can disable this message with a directive:
# shellcheck disable=SC2114
rm -rf /usr
Previous versions of shellcheck, up to and including 0.4.6, would ignore rm
statements containing a --
(an arbitrary convention). This is no longer the case.