Skip to content

Add ability to read plists from variables or stdout #6

@ranguli

Description

@ranguli

Detailed Description

I'd like to be able to point the Plist resource to something other than a file path, i.e a string. From my understanding, not all plists are easily accessible as files on the macOS system and can only be read by dumping from the plist using a command, like security authorization read system.preferences.

Context

To get around this, I tried:

# Do a command just to dump the plist
describe command('security authorizationdb read system.preferences > /tmp/system.preferences.plist') do
end
...
describe plist('/tmp/system.preferences.plist') do
...

But the command resource block doesn't seem to successfully create the file so that it can be accessed by the plist block, I'm not sure why.

Possible Implementation

Something like

foo = #read the file into a string.
describe plist_string(foo) do
  ...
end
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions