Skip to content

Commit

Permalink
Remove useless defination of diff_exit_code to be consistent.
Browse files Browse the repository at this point in the history
  • Loading branch information
hehe7318 committed May 23, 2024
1 parent 2158823 commit eaacb00
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@
group 'root'
code <<-EOH
diff_output=$(diff -r #{node['cluster']['cluster_user_home']} #{node['cluster']['cluster_user_local_home']})
diff_exit_code=$?
if [ $diff_exit_code -eq 0 ]; then
if [ $? -eq 0 ]; then
rm -rf /tmp#{node['cluster']['cluster_user_home']}
rm -rf #{node['cluster']['cluster_user_home']}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
expect(chef_run).to run_bash("Verify data integrity for #{user_home}").with(
code: <<-CODE
diff_output=$(diff -r #{user_home} #{user_local_home})
diff_exit_code=$?
if [ $diff_exit_code -eq 0 ]; then
if [ $? -eq 0 ]; then
rm -rf /tmp#{user_home}
rm -rf #{user_home}
else
Expand Down

0 comments on commit eaacb00

Please sign in to comment.