Skip to content

Commit

Permalink
Make gen dir if missing (#249)
Browse files Browse the repository at this point in the history
  • Loading branch information
rikhuijzer authored Nov 11, 2021
1 parent 5460866 commit 967a240
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,12 @@ function write_input_markdown(project; skip_index=false)::String
texts = read.(files, String)
texts = embed_output.(texts)
text = join(texts, '\n')
markdown_path = joinpath(Books.GENERATED_DIR, "input.md")
dir = Books.GENERATED_DIR
if !isdir(dir)
@warn "$(dir) directory doesn't exist. Did you run `gen()`?"
mkpath(dir)
end
markdown_path = joinpath(dir, "input.md")
write(markdown_path, text)
return markdown_path
end
Expand Down

0 comments on commit 967a240

Please sign in to comment.