Skip to content

Commit 218860e

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 ed4fe44 commit 218860e

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

lib/danger-packwerk/packwerk_wrapper.rb

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

4335
#

0 commit comments

Comments
 (0)