mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-09-20 02:57:19 +03:00
Handle EBUSY as well
This commit is contained in:
parent
a3ba8647ba
commit
94410f2866
@ -223,6 +223,8 @@ func error_from_status(status string) error {
|
||||
return fmt.Errorf("no primary selection available on this system")
|
||||
case "EPERM":
|
||||
return fmt.Errorf("permission denied")
|
||||
case "EBUSY":
|
||||
return fmt.Errorf("a temporary error occurred, try again later.")
|
||||
default:
|
||||
return fmt.Errorf("%s", status)
|
||||
}
|
||||
|
@ -102,6 +102,8 @@ func write_loop(inputs []*Input, opts *Options) (err error) {
|
||||
return fmt.Errorf("Could not write to primary selection as the system does not support it")
|
||||
case "EPERM":
|
||||
return fmt.Errorf("Could not write to clipboard as permission was denied")
|
||||
case "EBUSY":
|
||||
return fmt.Errorf("Could not write to clipboard, a temporary error occurred, try again later.")
|
||||
default:
|
||||
return fmt.Errorf("Could not write to clipboard unknowns status returned from terminal: %#v", metadata["status"])
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user