Skip to content

Commit

Permalink
Merge pull request #370 from legal90/fix-parallel-unregister
Browse files Browse the repository at this point in the history
Fix the concurrency issue with box un-register in multi-vm environment
  • Loading branch information
legal90 authored Nov 22, 2020
2 parents e433091 + 8900c6b commit a73b7ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/vagrant-parallels/action/box_unregister.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ def release_box_lock(lease_file)
file.flush
end

# Delete the lease file if we are the last who need this box.
# Delete the lease file if we were the last who needed this box.
# Then the box image will be unregistered.
lease_file.delete if lease_file.read.chomp.to_i <= 1
lease_file.delete if lease_file.read.chomp.to_i <= 0
end

def unregister_box(env)
Expand Down

0 comments on commit a73b7ea

Please # to comment.