mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
Handle EBUSY as well
This commit is contained in:
@@ -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"])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user