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

[#448] Fix brakeman run raising error on CI. #450

Merged
merged 1 commit into from
Aug 1, 2023

Conversation

htoo-eain-lwin
Copy link
Contributor

@htoo-eain-lwin htoo-eain-lwin commented Jul 27, 2023

close #448

What happened 👀

Having the following error using brakeman.run in Dangerfile causing error on CI.

danger-brakeman_scanner-0.1.1/lib/danger_plugin.rb:18:in `dirname':  (Danger::DSLError)
[!] Invalid `Dangerfile` file: no implicit conversion of nil into String
 #  from Dangerfile:7
 #  -------------------------------------------
 #  # Runs Brakeman on modified and added files
 >  brakeman.run
 #  
/danger-brakeman_scanner-0.1.1/lib/danger_plugin.rb:18:in `dirname': no implicit conversion of nil into String (TypeError)

  def run(options = File.dirname(Kernel.caller_locations.first.absolute_path))

Insight 📝

I try to run with brakeman.run('.') and brakeman.run('/.'). Both are working fine.

Proof Of Work 📹

This is the test repo using our template only with brakeman.run. The CI is failing with the brakeman error.
Here's the Action and here's the PR

This is with brakeman.run('./')
Here's Action and PR

Copy link
Member

@malparty malparty left a comment

Choose a reason for hiding this comment

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

OMG it was that simple ><
Thanks! Our project will directly benefit from it 🚀

@malparty malparty added this pull request to the merge queue Aug 1, 2023
Merged via the queue into develop with commit 989c576 Aug 1, 2023
@malparty malparty deleted the bug/gh-448-fix-brakeman-run branch August 1, 2023 02:43
@malparty malparty mentioned this pull request Sep 14, 2023
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.

Fix: error when running Danger step in CI workflow
3 participants