diff options
| author | Robert Günzler <r@gnzler.io> | 2022-11-21 19:58:18 +0100 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2022-11-24 21:11:03 +0100 |
| commit | e5d51808abcb5d12a03ed8a4edf9a28fa356e88e (patch) | |
| tree | 864ac74913f1ea5b716e3379d9d3e5fac6763ebb /bin | |
| parent | d12aab5736cb35cd0c7d0853885736e9ebb489ad (diff) | |
bin/iconez: handle missing system directories
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/iconez | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/iconez b/bin/iconez index 104158e..f000b6d 100755 --- a/bin/iconez +++ b/bin/iconez @@ -40,7 +40,7 @@ by_name() { [ -z "${fuzzy}" ] && name="^${name}$" # try getting .desktop entry for name # shellcheck disable=2086 - ident=$(fd -e desktop "${name}" ${desktop_dirs} -x grep Icon= | cut -d= -f2 | uniq) + ident=$(fd -e desktop "${name}" ${desktop_dirs} -x grep Icon= 2>/dev/null || true | cut -d= -f2 | uniq) fi if [ -z "${fuzzy}" ]; then @@ -55,7 +55,7 @@ by_name() { fi # shellcheck disable=2086 - fd -t f ${filetypes} "${ident}" ${icon_dirs} + fd -t f ${filetypes} "${ident}" ${icon_dirs} 2>/dev/null || true # avoid selecting svg, can be made to prefer svg if `-v` is removed # svg=$(printf "%s" "${icons}" | grep -v svg) |