diff options
| author | Josh Rahm <rahm@google.com> | 2024-02-09 13:26:35 -0700 |
|---|---|---|
| committer | Josh Rahm <rahm@google.com> | 2024-02-09 13:26:35 -0700 |
| commit | 41694abbb650e236bd8080311787f435664dd0de (patch) | |
| tree | b723a2f127454eeb35826205a19e278b31ddba7e /Setup.hs | |
| parent | 50d91022f328c6f3dd7d166967732dec9734887c (diff) | |
| download | montis-41694abbb650e236bd8080311787f435664dd0de.tar.gz montis-41694abbb650e236bd8080311787f435664dd0de.tar.bz2 montis-41694abbb650e236bd8080311787f435664dd0de.zip | |
Fix Setup to not crash when a symlink exists.
Diffstat (limited to 'Setup.hs')
| -rw-r--r-- | Setup.hs | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -51,5 +51,10 @@ main = do lnF from to = do printf "%s -> %s\n" from to - flip when (removeLink to) =<< doesFileExist to + flip when (removeLink to) =<< doesExist to createSymbolicLink from to + + doesExist f = do + b1 <- doesFileExist f + b2 <- doesDirectoryExist f + return (b1 || b2) |