Skip to content

Commit 866adcf

Browse files
committed
Fix RuboCop Style/IdenticalConditionalBranches offense
Hoist all_paths.delete(database_path) out of the skip_data conditional as it runs in both branches either way. Assisted-by: Claude Code:claude-sonnet-4-6
1 parent d8cc718 commit 866adcf

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

‎lib/morph-cli.rb‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,8 @@ def self.execute(directory, _development, env_config, skip_data: false)
2222
end
2323

2424
database_path = MorphCLI.database_path(directory)
25-
if skip_data
26-
all_paths.delete(database_path)
27-
database_path = nil
28-
else
29-
all_paths.delete(database_path)
30-
end
25+
all_paths.delete(database_path)
26+
database_path = nil if skip_data
3127

3228
size = MorphCLI.get_dir_size(directory, all_paths + [database_path].compact)
3329
puts "Uploading #{size}#{" (including #{database_path})" if database_path}..."

0 commit comments

Comments
 (0)