Skip to content

Commit f69f1f5

Browse files
arlimuschris-rock
authored andcommitted
make sure attributes are strings (#22)
This currently breaks inspec check when the default attribute isn't found and becomes nil. ``` Default postgresql configuration directory: does not exist. Postgresql may not be installed or we've misidentified the configuration directory. Default postgresql data directory: does not exist. Postgresql may not be installed or we've misidentified the data directory. /home/travis/.rvm/gems/ruby-2.3.3/bundler/gems/inspec-78c2a55945cb/lib/resources/postgres_conf.rb:29:in `dirname': can't convert Inspec::Attribute::DEFAULT_ATTRIBUTE to String (Inspec::Attribute::DEFAULT_ATTRIBUTE#to_str gives Inspec::Attribute::DEFAULT_ATTRIBUTE) (TypeError) ```
1 parent 0004cd0 commit f69f1f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

controls/postgres_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
'postgres_conf_path',
5151
description: 'define path for the postgresql configuration file',
5252
default: postgres.conf_path
53-
)
53+
).to_s
5454

5555
POSTGRES_HBA_CONF_FILE = attribute(
5656
'postgres_hba_conf_file',

0 commit comments

Comments
 (0)