diff options
author | Alejandro Colomar <alx@kernel.org> | 2025-01-09 13:32:20 +0100 |
---|---|---|
committer | Alejandro Colomar <alx@kernel.org> | 2025-01-11 20:00:57 +0100 |
commit | 3977fb05c8075fa3701e40fc9bd465d3aafb116e (patch) | |
tree | b01e452b4cd1748dcb94b9fce5147beb868c64fc | |
parent | 06bf2c90a574cb55e92494a925a2da1cfdd35738 (diff) | |
download | man-pages-3977fb05c8075fa3701e40fc9bd465d3aafb116e.tar.gz |
src/bin/duffman: Handle errors correctly
In src/bin/duffman line 30:
cd $(git rev-parse --show-toplevel);
^-- SC2046 (warning): Quote this to prevent word splitting.
^---------------------------^ SC2312 (info): Consider invoking this command separately to avoid masking its return value (or use '|| true' to ignore).
Reported-by: shellcheck(1)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
-rwxr-xr-x | src/bin/duffman | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bin/duffman b/src/bin/duffman index 273758d149..37fe8e8209 100755 --- a/src/bin/duffman +++ b/src/bin/duffman @@ -27,7 +27,8 @@ if test $# -gt 2; then exit 1; fi; -cd $(git rev-parse --show-toplevel); +git rev-parse --show-toplevel | read -r dir; +cd "$dir"; test -v MAN_KEEP_FORMATTING || export MAN_KEEP_FORMATTING=1; |