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

Check if file exists before loading with loadyaml. If not, return nil #314

Merged
merged 2 commits into from
Apr 16, 2015

Conversation

amateo
Copy link
Contributor

@amateo amateo commented Sep 2, 2014

In loadyaml function, check if file exists before trying to import. If not exists, return nil.

@underscorgan
Copy link
Contributor

Hi @amateo, thanks for the contribution, and apologies it took so long for us to review this. Do you think you could update tests in https://github.com/puppetlabs/puppetlabs-stdlib/blob/master/spec/functions/loadyaml_spec.rb to check the case where the file exists? Thanks!

@amateo
Copy link
Contributor Author

amateo commented Apr 13, 2015

I have added a test for the case when the file does not exist. The case in when it exists, it is already included in existent tests

@elyscape
Copy link
Contributor

I have added a test for the case when the file does not exist.

That doesn't seem to be included in this PR.

@amateo
Copy link
Contributor Author

amateo commented Apr 15, 2015

Sorry, I forgot to push the changes to github repository. I think they are now.

underscorgan pushed a commit that referenced this pull request Apr 16, 2015
Check if file exists before loading with loadyaml. If not, return nil
@underscorgan underscorgan merged commit 8a1d1e2 into puppetlabs:master Apr 16, 2015
@underscorgan
Copy link
Contributor

Great, thanks @amateo !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants