diff options
Diffstat (limited to 'third_party/nix/src/nix/cat.cc')
-rw-r--r-- | third_party/nix/src/nix/cat.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/third_party/nix/src/nix/cat.cc b/third_party/nix/src/nix/cat.cc index ea9fd0d942fd..9b2da929ac33 100644 --- a/third_party/nix/src/nix/cat.cc +++ b/third_party/nix/src/nix/cat.cc @@ -10,10 +10,12 @@ struct MixCat : virtual Args { void cat(ref<FSAccessor> accessor) { auto st = accessor->stat(path); - if (st.type == FSAccessor::Type::tMissing) + if (st.type == FSAccessor::Type::tMissing) { throw Error(format("path '%1%' does not exist") % path); - if (st.type != FSAccessor::Type::tRegular) + } + if (st.type != FSAccessor::Type::tRegular) { throw Error(format("path '%1%' is not a regular file") % path); + } std::cout << accessor->readFile(path); } |