* Give a better error message when trying to build something and
readOnlyMode is set.
This commit is contained in:
		
							parent
							
								
									13618b191e
								
							
						
					
					
						commit
						bcd6cdf0d8
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
					@ -796,6 +796,9 @@ void DerivationGoal::init()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    trace("init");
 | 
					    trace("init");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (readOnlyMode)
 | 
				
			||||||
 | 
					        throw Error(format("cannot build derivation `%1%' - no write access to the Nix store") % drvPath);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* The first thing to do is to make sure that the derivation
 | 
					    /* The first thing to do is to make sure that the derivation
 | 
				
			||||||
       exists.  If it doesn't, it may be created through a
 | 
					       exists.  If it doesn't, it may be created through a
 | 
				
			||||||
       substitute. */
 | 
					       substitute. */
 | 
				
			||||||
| 
						 | 
					@ -2122,6 +2125,9 @@ void SubstitutionGoal::init()
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (readOnlyMode)
 | 
				
			||||||
 | 
					        throw Error(format("cannot substitute path `%1%' - no write access to the Nix store") % storePath);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    subs = substituters;
 | 
					    subs = substituters;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    tryNext();
 | 
					    tryNext();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue