mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
win_msg: added doc about msg limit and included an explicit check for better error handling (#31078)
This commit is contained in:
@@ -36,6 +36,10 @@ $result = @{
|
||||
wait = $wait
|
||||
}
|
||||
|
||||
if ($msg.Length -gt 255) {
|
||||
Fail-Json -obj $result -message "msg length must be less than 256 characters, current length: $($msg.Length)"
|
||||
}
|
||||
|
||||
$msg_args = @($to, "/TIME:$display_seconds")
|
||||
|
||||
if ($wait) {
|
||||
|
||||
@@ -51,6 +51,7 @@ options:
|
||||
msg:
|
||||
description:
|
||||
- The text of the message to be displayed.
|
||||
- The message must be less than 256 characters.
|
||||
default: Hello world!
|
||||
author:
|
||||
- Jon Hawkesworth (@jhawkesworth)
|
||||
|
||||
Reference in New Issue
Block a user