builtins.storePath: Try to substitute the path if it is not yet valid
Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
		
							parent
							
								
									a6add93d73
								
							
						
					
					
						commit
						22d665019a
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -582,8 +582,8 @@ static void prim_storePath(EvalState & state, Value * * args, Value & v) | |||
|     if (!isInStore(path)) | ||||
|         throw EvalError(format("path `%1%' is not in the Nix store") % path); | ||||
|     Path path2 = toStorePath(path); | ||||
|     if (!store->isValidPath(path2)) | ||||
|         throw EvalError(format("store path `%1%' is not valid") % path2); | ||||
|     if (!settings.readOnlyMode) | ||||
|         store->ensurePath(path2); | ||||
|     context.insert(path2); | ||||
|     mkString(v, path, context); | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue