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:
1 parent
1e6b35f078
commit
a71faf5b9a
1 file changed
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user