Skip to content

Commit

Permalink
Catch 'The name is not activatable' DBus error when unclipping (gopas…
Browse files Browse the repository at this point in the history
…spw#1247)

On Fedora 31, `gopass unclip` fails with a "Failed to clear clipboard history"
notification. This is because DBus returns the following error message as
`klipper` is not available:

```
The name is not activatable
```

This commit adds this error message to the strings being ignored.

Fixes gopasspw#1209

Signed-off-by: Simon Krenger <skrenger@redhat.com>
  • Loading branch information
simonkrenger authored Apr 24, 2020
1 parent 22fe01a commit 86b8aac
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/clipboard/unclip_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ func clearClipboardHistory(ctx context.Context) error {
if strings.HasPrefix(call.Err.Error(), "The name org.kde.klipper was not provided") {
return nil
}
if strings.HasPrefix(call.Err.Error(), "The name is not activatable") {
return nil
}
return call.Err
}

Expand Down

0 comments on commit 86b8aac

Please sign in to comment.