throw a nice error if the OS is not supported

This commit is contained in:
amtoine 2023-04-01 09:05:27 +02:00
parent c6acc47092
commit 3041adad3c
No known key found for this signature in database
GPG Key ID: 37AAE9B486CFF1AB

View File

@ -465,6 +465,14 @@ export def clip [
check-clipboard clip.exe --system $"('xorg' | pretty-command) on linux"
$input | clip.exe
},
_ => {
error make --unspanned {
msg: $"(ansi red)unknown_operating_system(ansi reset):
'($nu.os-info.name)' is not supported by the ('clip' | pretty-command) command.
please open a feature request in the [issue tracker](char lparen)https://github.com/nushell/nushell/issues/new/choose(char rparen) to add your operating system to the standard library."
}
},
}
if not $silent {