ref: 42e662ac6c1f27e05479772398145d7aa25bf903
parent: aa1af3f1193ccd25a0b1ccb9318d3a6fc9b208e6
author: Ori Bernstein <ori@eigenstate.org>
date: Mon Sep 29 10:08:42 EDT 2014
Fail if we can't write the output.
--- a/install.myr
+++ b/install.myr
@@ -59,9 +59,11 @@
std.put("\t%s => %s\n", file, path)
std.unlink(path)
match std.slurp(file)
- | `std.Fail m: std.fatal(1, "Could not open %s for reading", file)
+ | `std.Fail m: std.fatal(1, "Could not open %s for reading\n", file)
| `std.Ok buf:
- std.blat(path, buf)
+ if !std.blat(path, buf)
+ std.put("Could not write %s\n", file)
+ ;;
std.slfree(buf)
;;
;;