Defer tail declarations

declare() calls that aren't followed by commit() are applied at the end
of the provision script. This change defers those until all provisions
have been executed. This prevents certain cases of preset loop faults.
This commit is contained in:
Zaid Abdulla committed 2018-09-15 00:09:58 -07:00
1 parent ec215ffb82
commit 1a56915d4b
5 files changed
+163 -83

No files matched your search

+8 -2
View File
@@ -98,8 +98,14 @@ function getAliasDeclarations(path, timestamp) {
}
}
if (prefix.length) decs.push([pattern, timestamp, { value: timestamp }]);
else decs.push([pattern, timestamp]);
decs.push({
path: pattern,
pathGet: timestamp,
pathSet: null,
attrGet: prefix.length ? { value: timestamp } : null,
attrSet: null,
defer: true
});
}
recursive(path, []);