summaryrefslogtreecommitdiff
path: root/Biz/Bild.hs
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2023-01-06 10:52:12 -0500
committerBen Sima <ben@bsima.me>2023-01-06 10:52:12 -0500
commit0f2a0f9df43fa5111b7753e0d4ca9a21e5fe908d (patch)
tree0b2aa57c22e3cc91340244fe6ca6c42a703ef677 /Biz/Bild.hs
parentfd2ed12bbc58fbcef3910952ed7df836664654e6 (diff)
Fix guile lib building bug
I need to guard on the existence of `out`. This should properly be a `Maybe FilePath`, but to make that change requires a lot of refactoring that I don't want to do right now. Instead, I added it to my todo list for later.
Diffstat (limited to 'Biz/Bild.hs')
-rw-r--r--Biz/Bild.hs25
1 files changed, 14 insertions, 11 deletions
diff --git a/Biz/Bild.hs b/Biz/Bild.hs
index 85b62db..14eb397 100644
--- a/Biz/Bild.hs
+++ b/Biz/Bild.hs
@@ -504,17 +504,20 @@ analyze hmap ns = case Map.lookup ns hmap of
builder = Local user,
outPath = outToPath out,
wrapper =
- [ "#!/usr/bin/env bash",
- "guile -C \""
- <> root </> intdir
- <> "\" -e main "
- <> "-s "
- <> Namespace.toPath namespace
- <> " \"$@\""
- ]
- |> joinWith "\n"
- |> Text.pack
- |> Just,
+ (out == Meta.None)
+ ?: ( Nothing,
+ [ "#!/usr/bin/env bash",
+ "guile -C \""
+ <> root </> intdir
+ <> "\" -e main "
+ <> "-s "
+ <> Namespace.toPath namespace
+ <> " \"$@\""
+ ]
+ |> joinWith "\n"
+ |> Text.pack
+ |> Just
+ ),
..
}
|> Just