diff options
Diffstat (limited to 'custom/redo.patch')
-rw-r--r-- | custom/redo.patch | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/custom/redo.patch b/custom/redo.patch new file mode 100644 index 00000000..cd3a678e --- /dev/null +++ b/custom/redo.patch | |||
@@ -0,0 +1,18 @@ | |||
1 | diff --git a/redo.hs b/redo.hs | ||
2 | index f0e816a..01c6a2e 100644 | ||
3 | --- a/redo.hs | ||
4 | +++ b/redo.hs | ||
5 | @@ -48,7 +48,12 @@ redo target dir = do | ||
6 | createDirectoryIfMissing True metaDepsDir | ||
7 | writeMD5 target path | ||
8 | oldEnv <- getEnvironment | ||
9 | - let newEnv = toList $ adjust (++ ":.") "PATH" $ insert "REDO_TARGET" target $ fromList oldEnv | ||
10 | + redoPath <- lookupEnv "REDO_PATH" | ||
11 | + let | ||
12 | + redoPath' = case redoPath of | ||
13 | + Just p -> p | ||
14 | + _ -> "." | ||
15 | + newEnv = toList $ adjust (++ (':' : redoPath')) "PATH" $ insert "REDO_TARGET" target $ fromList oldEnv | ||
16 | (_, _, _, ph) <- createProcess $ (shell $ cmd path) {env = Just newEnv} | ||
17 | exit <- waitForProcess ph | ||
18 | case exit of | ||