nushell/crates/nu-command/src
WindSoilder 7a728340de
return error when user break sleep by ctrl-c (#10234)
# Description

Closes: #10218
I think this is `sleep`'s specific issue, it's because it always return
a `Value::nothing` where it's interrupted by `ctrl-c`.

To fix the issue, I'd propose to make it returns Err(ShellError)

This is how it behaves:
```nushell
❯ sleep 5sec; echo "hello!"
^CError: nu:🐚:sleep_breaked

  × Sleep is breaked.

❯ sleep 5sec; ^echo "hello!"
^CError: nu:🐚:sleep_breaked

  × Sleep is breaked.
```
# User-Facing Changes
None

# Tests + Formatting


# After Submitting
2023-09-05 09:21:30 -05:00
..
bytes Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
charting Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
conversions Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
database Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
date Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
debug Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
env Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
experimental Add functions for each Value case (#9736) 2023-07-21 08:20:33 -05:00
filesystem Clean up trash support on Android (#10225) 2023-09-05 14:38:23 +02:00
filters Make append/prepend consistent for ranges (#10231) 2023-09-05 01:47:51 +02:00
formats Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
generators Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
hash Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
help Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
math Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
misc REFACTOR: move source out of deprecated commands (#9060) 2023-05-04 00:02:03 +02:00
network Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
path Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
platform return error when user break sleep by ctrl-c (#10234) 2023-09-05 09:21:30 -05:00
random Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
removed Rename misused "deprecation" to removal (#10000) 2023-08-15 07:17:31 +12:00
shells Fix usage for the exit command. (#9450) 2023-06-16 10:09:02 +02:00
strings Auto format let-else block (#10214) 2023-09-04 19:42:31 +12:00
system Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
viewers Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
default_context.rs move 'bytes' back to commands (#10051) 2023-08-19 22:43:53 +02:00
example_test.rs enable/update some example tests so they work again (#10058) 2023-08-19 09:06:59 -05:00
lib.rs Move eval_hook to nu-cmd-base (#10146) 2023-08-29 23:46:50 +02:00
progress_bar.rs cp progress bar implementation (#8012) 2023-02-22 11:57:38 -08:00
sort_utils.rs Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00