diff options
author | Nate McCurdy <mccurdy.nate@gmail.com> | 2018-10-31 09:32:09 -0700 |
---|---|---|
committer | Nate McCurdy <mccurdy.nate@gmail.com> | 2018-10-31 09:32:09 -0700 |
commit | feceaf44ea6e7f23196bf98f98978088dc2f567a (patch) | |
tree | a9fc7f31fc6a3e01614ba15f3db25084a495e0e7 /lib | |
parent | bd22643b7f6d8755f410ca5e4a11d3e4abf77559 (diff) | |
download | puppet-sshkeys_core-feceaf44ea6e7f23196bf98f98978088dc2f567a.tar.gz puppet-sshkeys_core-feceaf44ea6e7f23196bf98f98978088dc2f567a.tar.bz2 |
ssh_authorzed_key: Fix invalid 'options' error
Prior to this, the example of a valid "options" value for the
ssh_authorized_key type was syntactically incorrect; it did not include
the closing single quote.
Example of incorrect error message:
```
Error: Parameter options failed on Ssh_authorized_key[testkey]: Option from=foo.com is not valid. A single option must either be of the form 'option' or 'option="value". Multiple options must be provided as an array (file: /tmp/test.pp, line: 5)
```
After this, the error shows the correct syntax for specifying an option:
```
Error: Parameter options failed on Ssh_authorized_key[testkey]: Option from=foo.com is not valid. A single option must either be of the form 'option' or 'option="value"'. Multiple options must be provided as an array (file: /tmp/test.pp, line: 5)
```
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/type/ssh_authorized_key.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/type/ssh_authorized_key.rb b/lib/puppet/type/ssh_authorized_key.rb index 5c4df53..e11134f 100644 --- a/lib/puppet/type/ssh_authorized_key.rb +++ b/lib/puppet/type/ssh_authorized_key.rb @@ -115,7 +115,7 @@ module Puppet unless value == :absent || value =~ %r{^[-a-z0-9A-Z_]+(?:=\".*?\")?$} raise( Puppet::Error, - _("Option %{value} is not valid. A single option must either be of the form 'option' or 'option=\"value\". Multiple options must be provided as an array") % { value: value }, + _("Option %{value} is not valid. A single option must either be of the form 'option' or 'option=\"value\"'. Multiple options must be provided as an array") % { value: value }, ) end end |