Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to read plists from variables or stdout #6

Open
ranguli opened this issue Feb 21, 2021 · 0 comments
Open

Add ability to read plists from variables or stdout #6

ranguli opened this issue Feb 21, 2021 · 0 comments

Comments

@ranguli
Copy link

ranguli commented Feb 21, 2021

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
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant