Removes the generated temp directory to avoid fulling the /tmp after
running bee pack a few times.
This commit is contained in:
Faissal Elamraoui 2016-12-04 14:48:42 +01:00
parent a6ce37ddf3
commit b42874b967
1 changed files with 7 additions and 0 deletions

View File

@ -495,6 +495,13 @@ func packApp(cmd *Command, args []string) int {
tmpdir := path.Join(os.TempDir(), "beePack-"+str)
os.Mkdir(tmpdir, 0700)
defer func() {
// Remove the tmpdir once bee pack is done
err := os.RemoveAll(tmpdir)
if err != nil {
logger.Error("Failed to remove the generated temp dir")
}
}()
if build {
logger.Info("Building application...")