summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2017-09-13 10:26:53 -0700
committerOri Bernstein <ori@eigenstate.org>2017-09-13 10:28:12 -0700
commitd1432628dfd47f863ae877060921d5f8843b4fc6 (patch)
treebd3c8381ad049f76835a9100d30a700034bdf263 /lib
parenta5cc4f8eb810cd58f38333d2c5a64b5cd96bba89 (diff)
downloadmc-d1432628dfd47f863ae877060921d5f8843b4fc6.tar.gz
Create output path before using it
bio-unitwr could be executed before bio-write and tmpout/ doesn't exist yet in that case. Thanks Tobias Kortkamp.
Diffstat (limited to 'lib')
-rw-r--r--lib/bio/test/bio-unitwr.myr2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/bio/test/bio-unitwr.myr b/lib/bio/test/bio-unitwr.myr
index 5b66bbb..f101927 100644
--- a/lib/bio/test/bio-unitwr.myr
+++ b/lib/bio/test/bio-unitwr.myr
@@ -3,6 +3,8 @@ use bio
const main = {
var f
+
+ std.mkpath("tmpout")
match bio.create("tmpout/test-unitwr", bio.Wr, 0o644)
| `std.Ok bio: f = bio
| `std.Err m: std.fatal("Unable to open data file: {}\n", m)