Update keyring check to use -s instead of -f

Change condition to check if the keyring file is not empty before using it.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
WickedYodaandCopilot Autofix powered by AI authored and GitHub committed 2026-09-19 16:57:06 -05:00
1 parent 1e6b35f078
commit a71faf5b9a
1 file changed
+1 -1
+1 -1
View File
@@ -32,7 +32,7 @@ if [ -s /tmp/influxdata-archive.key ]; then
| sudo tee /etc/apt/sources.list.d/influxdata.list >/dev/null
else
# Fallback: use existing keyring if already present
if [ -f /usr/share/keyrings/influxdata-archive.gpg ]; then
if [ -s /usr/share/keyrings/influxdata-archive.gpg ]; then
echo "deb [signed-by=/usr/share/keyrings/influxdata-archive.gpg] https://repos.influxdata.com/debian stable main" \
| sudo tee /etc/apt/sources.list.d/influxdata.list >/dev/null
else