Skip to content

Commit ac8f747

Browse files
committed
Remove unnecessary rescue in PackwerkWrapper
This seems to be from a time when the CLI would exit. We don't use the CLI in a way where this can happen anymore.
1 parent c63b69b commit ac8f747

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

lib/danger-packwerk/packwerk_wrapper.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,6 @@ def self.get_offenses_for_files(files)
2525
cli.execute_command(['check', *files])
2626
reference_offenses = formatter.aggregated_offenses.compact.select { |offense| offense.is_a?(Packwerk::ReferenceOffense) }
2727
T.cast(reference_offenses, T::Array[Packwerk::ReferenceOffense])
28-
rescue SystemExit => e
29-
# Packwerk should probably exit positively here rather than raising an error -- there should be no
30-
# errors if the user has excluded all files being checked.
31-
if e.message == 'No files found or given. Specify files or check the include and exclude glob in the config file.'
32-
[]
33-
else
34-
raise
35-
end
3628
end
3729

3830
#

0 commit comments

Comments
 (0)