Skip to content

Commit

Permalink
Check for adding back should be within mismatch check
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorific committed Sep 26, 2024
1 parent cd027e4 commit 6981fa9
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions cookbooks/boxcutter_site_settings/recipes/remap_users.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@
puts "MISCHA remap_users: user=#{user_name}: " \
"current_uid=#{current_user_data['uid']}, " \
"desired_uid=#{desired_user_data['uid']}"
end

ruby_block "Fail if removing user #{user_name} and not adding back" do
block do
fail "boxcutter_site_settings::remap_users: User #{user_name} would be " \
"removed, but not added back to node['fb_users']['users'], aborting."
end
not_if do
node['fb_users']['users'][user_name]
ruby_block "Fail if removing user #{user_name} and not adding back" do
block do
fail "boxcutter_site_settings::remap_users: User #{user_name} would be " \
"removed, but not added back to node['fb_users']['users'], aborting."
end
not_if do
node['fb_users']['users'][user_name]
end
end
end
end
Expand Down

0 comments on commit 6981fa9

Please sign in to comment.