Skip to content

Commit

Permalink
Merge pull request #164 from jperville/remove-cidfile-on-container-re…
Browse files Browse the repository at this point in the history
…move

Removing a container should also remove its cidfile.
  • Loading branch information
bflad committed Jun 24, 2014
2 parents 5af94cd + b703388 commit 6e3d9cb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions providers/container.rb
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,14 @@ def remove_container
'force' => new_resource.force
)
docker_cmd!("rm #{rm_args} #{current_resource.id}")
remove_cidfile
end

def remove_cidfile
# run at compile-time to ensure cidfile is gone before running docker_cmd()
file cidfile do
action :nothing
end.run_action(:delete)
end

def remove_link
Expand Down

0 comments on commit 6e3d9cb

Please sign in to comment.