mirror of
				https://github.com/beego/bee.git
				synced 2025-10-31 02:13:23 +00:00 
			
		
		
		
	This fixes #330
Removes the generated temp directory to avoid fulling the /tmp after running bee pack a few times.
This commit is contained in:
		
							
								
								
									
										7
									
								
								pack.go
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								pack.go
									
									
									
									
									
								
							| @@ -495,6 +495,13 @@ func packApp(cmd *Command, args []string) int { | |||||||
| 	tmpdir := path.Join(os.TempDir(), "beePack-"+str) | 	tmpdir := path.Join(os.TempDir(), "beePack-"+str) | ||||||
|  |  | ||||||
| 	os.Mkdir(tmpdir, 0700) | 	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 { | 	if build { | ||||||
| 		logger.Info("Building application...") | 		logger.Info("Building application...") | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Faissal Elamraoui
					Faissal Elamraoui