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

Handle deleted template files for new module #725

Merged
merged 1 commit into from
Aug 14, 2019

Conversation

seanmil
Copy link
Contributor

@seanmil seanmil commented Aug 7, 2019

When using pdk new module to create a new module, handle the
situation where the template used contains one or more files
with delete: true in config_defaults.yml instead of causing
an error.

When using 'pdk new module' to create a new module, handle the
situation where the template used contains one or more files
with `delete: true` in `config_defaults.yml` instead of causing
an error.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.002%) to 92.067% when pulling 61641f2 on Secure-24:new_module_with_deleted into c60eea9 on puppetlabs:master.

@@ -58,7 +58,8 @@ def self.invoke(opts = {})

begin
PDK::Module::TemplateDir.new(template_uri, metadata.data, true) do |templates|
templates.render do |file_path, file_content|
templates.render do |file_path, file_content, file_status|
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I must be missing something but where does file_status come from?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@scotje scotje left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me!

@scotje scotje added this to the August 2019 milestone Aug 7, 2019
@scotje scotje added the bug label Aug 7, 2019
@rodjek rodjek merged commit 8cc51d5 into puppetlabs:master Aug 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants