Add a comment explaining why we are disabling errexit for wl-paste

This commit is contained in:
BarbUk 2023-04-27 09:49:11 +02:00
parent ba4e8a1d66
commit 97c3663849
No known key found for this signature in database
GPG Key ID: B6D01F84A7519939

6
snippy
View File

@ -349,9 +349,11 @@ run() {
# save current clipboard # save current clipboard
if [[ $is_wayland ]]; then if [[ $is_wayland ]]; then
set +e # Disabling errexit for wl-paste,
# because it return 1 when they are nothing to paste
set +o errexit
current_clipboard=$(wl-paste) current_clipboard=$(wl-paste)
set -e set -o errexit
else else
current_clipboard=$(xsel --clipboard) current_clipboard=$(xsel --clipboard)
fi fi