bem/bem-tools — pull request #538 by SevInf (2014-01-10 16:58:46+00:00)
Title: Save build cache data only on successful build

If `getBuildResult` fails, `getBuildResults` was still saving source files timestamps. So, if malformed source file was not changed before next build, `getBuildResult` won't be called second time and build error will not be reproduced.

To reproduce:

1. Check out `bemhtml` tech from bem/bem-bl#439
2. Build some valid `bemhtml` with it.
3. Change `bemhtml` to be invalid.
4. Build project again. It will fail with error.
5. Build project again. Build will not fail second time.

@arikon @scf2k