Skip to content

Commit

Permalink
bin/systemd-analyze-plot: do not use read without a variable
Browse files Browse the repository at this point in the history
shellcheck 0.10.0 reports:

    In bin/systemd-analyze-plot line 32:
        read -r 2> /dev/null
        ^--^ SC3061 (warning): In POSIX sh, read without a variable is undefined.

Silence this by using an unused variable.
koalaman/shellcheck#1134 suggests using `$_`
for such a use-case.
  • Loading branch information
fishilico committed Apr 14, 2024
1 parent 34e1544 commit 14d616e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/systemd-analyze-plot
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if systemd-analyze plot > "$TEMP"
then
xdg-open "$TEMP"
echo "Press 'Enter' to quit."
read -r 2> /dev/null
read -r _ 2> /dev/null
else
exit $?
fi
Expand Down

0 comments on commit 14d616e

Please sign in to comment.