-
Notifications
You must be signed in to change notification settings - Fork 104
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
(PDK-430) Do not cache template-url answer if using the default template #265
Conversation
lib/pdk/generators/module.rb
Outdated
@@ -68,7 +68,7 @@ def self.invoke(opts = {}) | |||
end | |||
end | |||
|
|||
PDK.answers.update!('template-url' => template_url) | |||
PDK.answers.update!('template-url' => template_url) unless template_url == default_template_url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get the intent of the original line - is this updating the answer for template_url with a local copy of the template instead of the initial remote URL?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as implemented this change also means that there is no way to reset to using the default without deleting/editing the ansers.json file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@james-stocks yeah, the intent is that if a user specifies a custom template URL (for example, a company which has their own internal module template that they'd like to use), it will be remembered for subsequent pdk new module
runs.
@DavidS good point!
No description provided.