* `nix-env --set': support --dry-run.
This commit is contained in:
		
							parent
							
								
									7592f48c83
								
							
						
					
					
						commit
						001b3f06ec
					
				
					 1 changed files with 10 additions and 3 deletions
				
			
		|  | @ -791,10 +791,17 @@ static void opSet(Globals & globals, | ||||||
|      |      | ||||||
|     DrvInfo & drv(elems.front()); |     DrvInfo & drv(elems.front()); | ||||||
| 
 | 
 | ||||||
|     if (drv.queryDrvPath(globals.state) != "") |     if (drv.queryDrvPath(globals.state) != "") { | ||||||
|         store->buildDerivations(singleton<PathSet>(drv.queryDrvPath(globals.state))); |         PathSet paths = singleton<PathSet>(drv.queryDrvPath(globals.state)); | ||||||
|     else |         printMissing(paths); | ||||||
|  |         if (globals.dryRun) return; | ||||||
|  |         store->buildDerivations(paths); | ||||||
|  |     } | ||||||
|  |     else { | ||||||
|  |         printMissing(singleton<PathSet>(drv.queryOutPath(globals.state))); | ||||||
|  |         if (globals.dryRun) return; | ||||||
|         store->ensurePath(drv.queryOutPath(globals.state)); |         store->ensurePath(drv.queryOutPath(globals.state)); | ||||||
|  |     } | ||||||
| 
 | 
 | ||||||
|     debug(format("switching to new user environment")); |     debug(format("switching to new user environment")); | ||||||
|     Path generation = createGeneration(globals.profile, drv.queryOutPath(globals.state)); |     Path generation = createGeneration(globals.profile, drv.queryOutPath(globals.state)); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue