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

Support input deserialization from FileInfo objects #95

Closed
BernieWhite opened this issue Feb 25, 2019 · 0 comments
Closed

Support input deserialization from FileInfo objects #95

BernieWhite opened this issue Feb 25, 2019 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@BernieWhite
Copy link
Member

Currently PSRule de-serializes YAML and JSON objects from string when the -Format parameter is used with Invoke-PSRule and Test-PSRuleTarget.

To read a YAML file from disk, Get-Content -Raw -Path path_to_file | Out-String needs to be used.

For example:

Invoke-PSRule -InputObject (Get-Content -Raw -Path path_to_file | Out-String) -Format Yaml;

Instead -InputObject should automatically read and deserialize the file contents of FileInfo objects when the -Format is used.

For example:

Invoke-PSRule -InputObject (Get-ChildItem -Path path_to_file) -Format Yaml;
@BernieWhite BernieWhite added the enhancement New feature or request label Feb 25, 2019
@BernieWhite BernieWhite added this to the v0.3.0 milestone Feb 25, 2019
@BernieWhite BernieWhite self-assigned this Feb 25, 2019
BernieWhite added a commit that referenced this issue Feb 25, 2019
* Support input deserialization from FileInfo objects #95
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant