diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb index 12a67c19dc..d476a0882e 100644 --- a/Library/Homebrew/dev-cmd/bottle.rb +++ b/Library/Homebrew/dev-cmd/bottle.rb @@ -446,6 +446,7 @@ module Homebrew gz.write(tarfile.read(GZIP_BUFFER_SIZE)) until tarfile.eof? end gz.close + rm_f relocatable_tar_path sudo_purge end diff --git a/Library/Homebrew/test/dev-cmd/bottle_spec.rb b/Library/Homebrew/test/dev-cmd/bottle_spec.rb index 796888ce1a..476cd816da 100644 --- a/Library/Homebrew/test/dev-cmd/bottle_spec.rb +++ b/Library/Homebrew/test/dev-cmd/bottle_spec.rb @@ -21,6 +21,7 @@ describe "brew bottle" do .to output(/testball--0\.1.*\.bottle\.tar\.gz/).to_stdout .and not_to_output.to_stderr .and be_a_success + expect(HOMEBREW_CELLAR/"testball-bottle.tar").not_to exist ensure FileUtils.rm_f Dir.glob("testball--0.1*.bottle.tar.gz") end