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

Error running batch:map_warnings --with_counts when there are no warnings #52

Open
kspurgin opened this issue Mar 5, 2024 · 0 comments

Comments

@kspurgin
Copy link
Collaborator

kspurgin commented Mar 5, 2024

This batch had errors, not warnings. Out of habit, I ran the wrong command and it was ugly instead of graceful:

❯  thor batch map_warnings --with_counts era
/Users/kristina/code/cs/migration_tools/lib/tasks/batch.thor:250:in `report_warnings_with_counts': undefined method `length' for nil:NilClass (NoMethodError)

      end.last.length
              ^^^^^^^
	from /Users/kristina/code/cs/migration_tools/lib/tasks/batch.thor:142:in `block in map_warnings'
	from /Users/kristina/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/dry-monads-1.5.0/lib/dry/monads/result.rb:124:in `either'
	from /Users/kristina/code/cs/migration_tools/lib/tasks/batch.thor:140:in `map_warnings'
	from /Users/kristina/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/thor-1.3.0/lib/thor/command.rb:28:in `run'
	from /Users/kristina/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/thor-hollaback-0.2.1/lib/thor/hollaback.rb:68:in `run'
	from /Users/kristina/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/thor-1.3.0/lib/thor/invocation.rb:127:in `invoke_command'
	from /Users/kristina/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/thor-1.3.0/lib/thor.rb:527:in `dispatch'
	from /Users/kristina/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/thor-1.3.0/lib/thor/base.rb:584:in `start'
	from /Users/kristina/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/thor-1.3.0/lib/thor/runner.rb:41:in `method_missing'
	from /Users/kristina/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/thor-1.3.0/lib/thor/command.rb:30:in `run'
	from /Users/kristina/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/thor-1.3.0/lib/thor/command.rb:144:in `run'
	from /Users/kristina/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/thor-1.3.0/lib/thor/invocation.rb:127:in `invoke_command'
	from /Users/kristina/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/thor-1.3.0/lib/thor.rb:527:in `dispatch'
	from /Users/kristina/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/thor-1.3.0/lib/thor/base.rb:584:in `start'
	from /Users/kristina/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/thor-1.3.0/bin/thor:6:in `<top (required)>'
	from /Users/kristina/.rbenv/versions/3.1.0/bin/thor:25:in `load'
	from /Users/kristina/.rbenv/versions/3.1.0/bin/thor:25:in `<main>'
@kspurgin kspurgin changed the title Error running batch:map_warnings --with_counts Error running batch:map_warnings --with_counts when there are no warnings Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant