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

Question about the override to Rake::Task#execute #2196

Closed
hosamaly opened this issue Dec 12, 2023 · 2 comments · Fixed by #2214
Closed

Question about the override to Rake::Task#execute #2196

hosamaly opened this issue Dec 12, 2023 · 2 comments · Fixed by #2214

Comments

@hosamaly
Copy link

I'm a bit confused about this piece of code:

module Task
# @api private
def execute(args=nil)
return super unless Sentry.initialized? && Sentry.get_current_hub
super
end
end

The override doesn't seem to do much other than call Sentry.get_current_hub.

If this is the case, it would be slightly clearer, in my humble opinion, to define it as:

def execute(args=nil) 
  Sentry.get_current_hub if Sentry.initialized?
  super
end

Did I understand the purpose of the method correctly?

@sl0thentr0py
Copy link
Member

I think this is leftover code from #1617, I don't even think we need the Task patch anymore. @st0012 can you verify?

@st0012
Copy link
Collaborator

st0012 commented Jan 1, 2024

@sl0thentr0py Yes you're right. I've opened #2214 to remove it.
@hosamaly Thanks for raising this!

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

Successfully merging a pull request may close this issue.

3 participants