From 0f2a0f9df43fa5111b7753e0d4ca9a21e5fe908d Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Fri, 6 Jan 2023 10:52:12 -0500 Subject: 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. --- Biz/Bild.hs | 25 ++++++++++++++----------- 1 file 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 -- cgit v1.2.3