mirror of
https://github.com/NixOS/nix
synced 2025-06-28 09:31:16 +02:00
nix flake: clarify error message when file is an unknown type
This commit is contained in:
parent
2d9b213cc2
commit
22adffec34
7 changed files with 59 additions and 13 deletions
|
@ -49,11 +49,13 @@ void copyRecursive(
|
|||
break;
|
||||
}
|
||||
|
||||
case SourceAccessor::tMisc:
|
||||
throw Error("file '%1%' has an unsupported type", from);
|
||||
|
||||
case SourceAccessor::tChar:
|
||||
case SourceAccessor::tBlock:
|
||||
case SourceAccessor::tSocket:
|
||||
case SourceAccessor::tFifo:
|
||||
case SourceAccessor::tUnknown:
|
||||
default:
|
||||
unreachable();
|
||||
throw Error("file '%1%' has an unsupported type of %2%", from, stat.typeString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue