mirror of
https://github.com/NixOS/nix
synced 2025-06-24 22:11:15 +02:00
throw BadStorePath for empty string
some of the functional tests that run config check wouldn't tolerate some oddities in `PATH`, something like a null string entry (e.g. `::` in the middle or a trailing `:`) I think. This allows the test pass. Signed-off-by: Samuli Thomasson <samuli.thomasson@pm.me>
This commit is contained in:
parent
8f56724e2b
commit
6041531716
1 changed files with 3 additions and 0 deletions
|
@ -77,6 +77,9 @@ StorePath StorePath::random(std::string_view name)
|
|||
|
||||
StorePath MixStoreDirMethods::parseStorePath(std::string_view path) const
|
||||
{
|
||||
if (path.empty())
|
||||
throw BadStorePath("empty path is not a valid store path");
|
||||
|
||||
// On Windows, `/nix/store` is not a canonical path. More broadly it
|
||||
// is unclear whether this function should be using the native
|
||||
// notion of a canonical path at all. For example, it makes to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue