Skip to content

Commit

Permalink
Fix Rubocop offense
Browse files Browse the repository at this point in the history
  • Loading branch information
dgdavid committed Oct 28, 2021
1 parent e3d7069 commit f4f5cab
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/lib/y2users/linux/users_writer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,8 @@ def edit_user(initial_user, target_user)
adapt_home_ownership(target_user) if commit_config.adapt_home_ownership?
edit_password(target_user) if initial_user.password != target_user.password

if initial_user.authorized_keys != target_user.authorized_keys
write_auth_keys(target_user, initial_user.authorized_keys)
end
previous_keys = initial_user.authorized_keys
write_auth_keys(target_user, previous_keys) if previous_keys != target_user.authorized_keys
end

# Updates root aliases
Expand Down

0 comments on commit f4f5cab

Please sign in to comment.