-
Notifications
You must be signed in to change notification settings - Fork 125
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
Change recieving options in Itamae::Resource::Base at initialize time #144
Conversation
end | ||
|
||
send_tempfile | ||
unless options[:dry_run] |
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.
create
action in dry-run mode shows difference between tempfile and current file. This break the ability.
Changing # base.rb
if method(:pre_action).arity == 1
pre_action(options)
else
Logger.warn "DEPRECATION WARNING: #{resource_type} resource does not accept `options` arg."
pre_action
end
# resource
# option arg is not optional
def pre_action(options)
# ...
end |
fae8160
to
21940e3
Compare
Thanks for a detail explanation. I think receiving options as arguments in |
In `Itame::Recipe` and `Itamae::Resource::Base`
21940e3
to
5d30ac9
Compare
Sorry for late reply. I'll check this PR later. |
ref #136
When
dry_run
mode, raise an error inedit
action against afile
resource if the target file does not exist.So, I skip the method that raise an error to use
dry_run
options.this is recipe.rb
Before apply this patch
After apply this patch
As above, after Apply this patch, if the target file does not exist, we can't detect an error In
dry_run