commit:     a598f24da0ff4aaa603f6479994fcb61e12e7397
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Tue Jun 10 10:11:00 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jun 12 10:43:41 2025 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=a598f24d

estrip: suppress an SC2181 notice that would be awkward to satisfy

In the case that the '?' parameter is being compared to 0, shellcheck
suggests that the exit code of the preceding command be checked
directly. In most cases, this is good advice. However, it would be
awkward to accede to it for the case that it is complaining of.

Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 bin/estrip | 1 +
 1 file changed, 1 insertion(+)

diff --git a/bin/estrip b/bin/estrip
index d24a2663fd..4df771b3e3 100755
--- a/bin/estrip
+++ b/bin/estrip
@@ -149,6 +149,7 @@ save_elf_debug() {
 
                # Only do the following if the debug file was
                # successfully created (see bug #446774).
+               # shellcheck disable=2181
                if [[ $? -eq 0 ]] ; then
                        arg="a-x,o-w"
                        [[ -g ${src} || -u ${src} ]] && arg+=",go-r"

Reply via email to