Page MenuHomeDevCentral

Prevent globbing and word splitting for shell script name
ClosedPublic

Authored by dereckson on Sep 6 2024, 21:38.
Tags
None
Referenced Files
F11723056: D3429.diff
Tue, Sep 16, 07:44
F11722076: D3429.id8851.diff
Tue, Sep 16, 00:21
F11721038: D3429.diff
Mon, Sep 15, 16:35
F11720992: D3429.diff
Mon, Sep 15, 16:14
Unknown Object (File)
Fri, Sep 12, 23:36
Unknown Object (File)
Fri, Sep 12, 19:38
Unknown Object (File)
Fri, Sep 12, 16:00
Unknown Object (File)
Thu, Sep 11, 00:57
Subscribers
None

Details

Summary

Shellcheck highlights an issue with the shell script snippet:

In roles/core/certificates/files/delete-certbot-certificate.sh line 28:
    echo "Usage: $(basename $0) <certificate>" >&2
                            ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
    echo "Usage: $(basename "$0") <certificate>" >&2
Test Plan

Tested with new script in rOPS

Diff Detail

Repository
rSNIPPETS Snippets
Lint
Lint Not Applicable
Unit
Tests Not Applicable