mirror of
https://github.com/NixOS/nix.git
synced 2025-11-26 04:00:59 +01:00
created sub commit scripts
This commit is contained in:
parent
86b053dd80
commit
97eb8c32a0
7 changed files with 27 additions and 10 deletions
|
|
@ -440,8 +440,13 @@ static Expr prim_derivationStrict(EvalState & state, const ATermVector & args)
|
|||
startNest(nest, lvlVomit, format("processing statedir attribute `%1%'") % statekey);
|
||||
try {
|
||||
string s = coerceToString(state, statevalue, context, true);
|
||||
|
||||
if (statekey == "dir") { dir.path = s; }
|
||||
if (statekey == "dir") {
|
||||
//Add a / to the end if it's not there
|
||||
if(s[s.length() - 1] != '/')
|
||||
dir.path = s + "/";
|
||||
else
|
||||
dir.path = s;
|
||||
}
|
||||
else if (statekey == "type") { dir.type = s; }
|
||||
else if (statekey == "interval") { dir.interval = s; }
|
||||
else throw EvalError(format("invalid subattirbute `%1%' for attribute dirs") % statekey);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue