Skip to content

Commit 3f60fa0

Browse files
author
guttermonk
committed
Remove trailing newline from tooltip text
1 parent ecf6307 commit 3f60fa0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ let
214214
error_output=$(nix build .#nixosConfigurations.$(hostname).config.system.build.toplevel 2>&1)
215215
if [ "$?" -eq 0 ]; then
216216
updates=$(nvd diff /run/current-system ./result | grep -e '\[U' | wc -l)
217-
tooltip=$(nvd diff /run/current-system ./result | grep -e '\[U' | awk '{ for (i=3; i<NF; i++) printf $i " "; if (NF >= 3) print $NF; }' ORS='\\n')
217+
tooltip=$(nvd diff /run/current-system ./result | grep -e '\[U' | awk '{ for (i=3; i<NF; i++) printf $i " "; if (NF >= 3) print $NF; }' ORS='\\n' | sed 's/\\n$//')
218218
else
219219
# Extract just the error line starting with "error:"
220220
error_line=$(echo "$error_output" | grep "^ error:" | head -1 | sed 's/^[[:space:]]*//')

update-checker

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ function check_for_updates() {
214214
error_output=$(nix build .#nixosConfigurations.$(hostname).config.system.build.toplevel 2>&1)
215215
if [ "$?" -eq 0 ]; then
216216
updates=$(nvd diff /run/current-system ./result | grep -e '\[U' | wc -l)
217-
tooltip=$(nvd diff /run/current-system ./result | grep -e '\[U' | awk '{ for (i=3; i<NF; i++) printf $i " "; if (NF >= 3) print $NF; }' ORS='\\n')
217+
tooltip=$(nvd diff /run/current-system ./result | grep -e '\[U' | awk '{ for (i=3; i<NF; i++) printf $i " "; if (NF >= 3) print $NF; }' ORS='\\n' | sed 's/\\n$//')
218218
else
219219
# Extract just the error line starting with "error:"
220220
error_line=$(echo "$error_output" | grep "^ error:" | head -1 | sed 's/^[[:space:]]*//')

0 commit comments

Comments
 (0)