{"action":"created","issue":{"url":"https://api.github.com/repos/chef/inspec/issues/2967","repository_url":"https://api.github.com/repos/chef/inspec","labels_url":"https://api.github.com/repos/chef/inspec/issues/2967/labels{/name}","comments_url":"https://api.github.com/repos/chef/inspec/issues/2967/comments","events_url":"https://api.github.com/repos/chef/inspec/issues/2967/events","html_url":"https://github.com/chef/inspec/issues/2967","id":315134199,"number":2967,"title":"file not found by parse_config_file, but .exist? returns true","user":{"login":"chazzzle","id":3591741,"avatar_url":"https://avatars3.githubusercontent.com/u/3591741?v=4","gravatar_id":"","url":"https://api.github.com/users/chazzzle","html_url":"https://github.com/chazzzle","followers_url":"https://api.github.com/users/chazzzle/followers","following_url":"https://api.github.com/users/chazzzle/following{/other_user}","gists_url":"https://api.github.com/users/chazzzle/gists{/gist_id}","starred_url":"https://api.github.com/users/chazzzle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chazzzle/subscriptions","organizations_url":"https://api.github.com/users/chazzzle/orgs","repos_url":"https://api.github.com/users/chazzzle/repos","events_url":"https://api.github.com/users/chazzzle/events{/privacy}","received_events_url":"https://api.github.com/users/chazzzle/received_events","type":"User","site_admin":false},"labels":[{"id":253920983,"url":"https://api.github.com/repos/chef/inspec/labels/Type:%20Bug","name":"Type: Bug","color":"fc2929","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-04-17T16:19:49Z","updated_at":"2018-04-27T20:13:14Z","closed_at":null,"author_association":"NONE","body":"### 🎛 `Description`\r\n\r\n**Choose one:**  this is a 🐛 bug report\r\n\r\nfile('/etc/rc.conf').exist? returns true but parse_config_file states it cannot find that very same file.\r\n\r\n### 🌍 InSpec and Platform Version\r\n\r\ninspec version 2.1.43 on CentOS 6, FreeBSD 10.4\r\n\r\n### 🤔 Replication Case\r\n\r\n1. install inspec on centos 6 and open a shell to a FreeBSD 10.4 machine\r\n```\r\n[root@centos6 ~]# inspec shell -t ssh://user:password@freebsd10-box\r\nWelcome to the interactive InSpec Shell\r\nTo find out how to use it, type: help\r\n\r\nYou are currently running on:\r\n\r\n    Name:      freebsd\r\n    Families:  bsd, unix, os\r\n    Release:   10.4-RELEASE-p3\r\n    Arch:      i386\r\n```\r\n2. check if file /etc/rc.conf exists and try to parse_config_file\r\n```\r\ninspec> file('/etc/rc.conf').exist?\r\n=> true\r\ninspec> describe parse_config_file('/etc/rc.conf') do\r\ninspec>   its('syslogd_enable') { should eq 'YES' }\r\ninspec> end\r\n\r\nProfile: inspec-shell\r\nVersion: (not specified)\r\n\r\n  Parse Config File /etc/rc.conf\r\n     ↺  Can't find file: /etc/rc.conf\r\n\r\nTest Summary: 0 successful, 0 failures, 1 skipped\r\n```\r\n\r\n\r\n### 💁 Possible Solutions\r\n\r\nNone.\r\n"},"comment":{"url":"https://api.github.com/repos/chef/inspec/issues/comments/385081697","html_url":"https://github.com/chef/inspec/issues/2967#issuecomment-385081697","issue_url":"https://api.github.com/repos/chef/inspec/issues/2967","id":385081697,"user":{"login":"clintoncwolfe","id":156460,"avatar_url":"https://avatars3.githubusercontent.com/u/156460?v=4","gravatar_id":"","url":"https://api.github.com/users/clintoncwolfe","html_url":"https://github.com/clintoncwolfe","followers_url":"https://api.github.com/users/clintoncwolfe/followers","following_url":"https://api.github.com/users/clintoncwolfe/following{/other_user}","gists_url":"https://api.github.com/users/clintoncwolfe/gists{/gist_id}","starred_url":"https://api.github.com/users/clintoncwolfe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clintoncwolfe/subscriptions","organizations_url":"https://api.github.com/users/clintoncwolfe/orgs","repos_url":"https://api.github.com/users/clintoncwolfe/repos","events_url":"https://api.github.com/users/clintoncwolfe/events{/privacy}","received_events_url":"https://api.github.com/users/clintoncwolfe/received_events","type":"User","site_admin":false},"created_at":"2018-04-27T20:13:14Z","updated_at":"2018-04-27T20:13:14Z","author_association":"CONTRIBUTOR","body":"Could it be possible `/etc/rc.conf` is a directory?  If that is the case, I can replicate the above.\r\n\r\n```\r\ninspec> file('.').exist?\r\n=> true\r\ninspec> file('.').file?\r\n=> false\r\ninspec> describe parse_config_file('.') do\r\ninspec>   its('syslogd_enable') { should eq 'YES' }\r\ninspec> end\r\n\r\nProfile: inspec-shell\r\nVersion: (not specified)\r\n\r\n  Parse Config File .\r\n     ↺  Can't find file: .\r\n\r\nTest Summary: 0 successful, 0 failures, 1 skipped\r\n```\r\n\r\nThat's not a great message from `parse_config_file`."}}
{"actor":{"display_login":"clintoncwolfe"}}