about summary refs log tree commit diff
path: root/third_party/nix/src/nix/cat.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/nix/cat.cc')
-rw-r--r--third_party/nix/src/nix/cat.cc6
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 ea9fd0d942..9b2da929ac 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);
   }