1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 15:51:15 +02:00

build: replace 100 offset for build exit codes

This commit is contained in:
Daiderd Jordan 2019-06-15 15:28:32 +02:00
parent 1ac399dd11
commit a52c331edb
No known key found for this signature in database
GPG key ID: D02435D05B810C96
3 changed files with 30 additions and 9 deletions

View file

@ -4471,15 +4471,29 @@ void Worker::waitForInput()
unsigned int Worker::exitStatus()
{
/*
* 1100100
* ^^^^
* |||`- timeout
* ||`-- output hash mismatch
* |`--- build failure
* `---- not deterministic
*/
unsigned int mask = 0;
bool buildFailure = permanentFailure || timedOut || hashMismatch;
if (buildFailure)
mask |= 0x04; // 100
if (timedOut)
mask |= 1;
mask |= 0x01; // 101
if (hashMismatch)
mask |= 2;
if (checkMismatch)
mask |= 4;
mask |= 0x02; // 102
if (checkMismatch) {
mask |= 0x08; // 104
}
return mask ? 100 + mask : 1;
if (mask)
mask |= 0x60;
return mask ? mask : 1;
}