1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-04 07:11:47 +02:00

Merge pull request #10863 from NixOS/backport-10861-to-2.23-maintenance

[Backport 2.23-maintenance] PackageInfo::queryDrvPath(): Don't dereference an empty optional
This commit is contained in:
Eelco Dolstra 2024-06-05 17:17:28 +02:00 committed by GitHub
commit c148aaa998
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View file

@ -82,8 +82,7 @@ std::optional<StorePath> PackageInfo::queryDrvPath() const
} else
drvPath = {std::nullopt};
}
drvPath.value_or(std::nullopt);
return *drvPath;
return drvPath.value_or(std::nullopt);
}

View file

@ -278,7 +278,7 @@ private:
storePath = state.coerceToStorePath(i->pos, *i->value, context, "while evaluating the drvPath of a derivation");
}
/* This unforutately breaks printing nested values because of
/* This unfortunately breaks printing nested values because of
how the pretty printer is used (when pretting printing and warning
to same terminal / std stream). */
#if 0