Complain if /homeless-shelter exists
This commit is contained in:
		
							parent
							
								
									239841787b
								
							
						
					
					
						commit
						258897c265
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		|  | @ -1697,7 +1697,8 @@ void DerivationGoal::startBuilder() | ||||||
|        if HOME is not set, but they will just assume that the settings file |        if HOME is not set, but they will just assume that the settings file | ||||||
|        they are looking for does not exist if HOME is set but points to some |        they are looking for does not exist if HOME is set but points to some | ||||||
|        non-existing path. */ |        non-existing path. */ | ||||||
|     env["HOME"] = "/homeless-shelter"; |     Path homeDir = "/homeless-shelter"; | ||||||
|  |     env["HOME"] = homeDir; | ||||||
| 
 | 
 | ||||||
|     /* Tell the builder where the Nix store is.  Usually they
 |     /* Tell the builder where the Nix store is.  Usually they
 | ||||||
|        shouldn't care, but this is useful for purity checking (e.g., |        shouldn't care, but this is useful for purity checking (e.g., | ||||||
|  | @ -1946,6 +1947,9 @@ void DerivationGoal::startBuilder() | ||||||
| 
 | 
 | ||||||
|     else { |     else { | ||||||
| 
 | 
 | ||||||
|  |         if (pathExists(homeDir)) | ||||||
|  |             throw Error(format("directory `%1%' exists; please remove it") % homeDir); | ||||||
|  | 
 | ||||||
|         /* We're not doing a chroot build, but we have some valid
 |         /* We're not doing a chroot build, but we have some valid
 | ||||||
|            output paths.  Since we can't just overwrite or delete |            output paths.  Since we can't just overwrite or delete | ||||||
|            them, we have to do hash rewriting: i.e. in the |            them, we have to do hash rewriting: i.e. in the | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue