diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-12-18 17:01:15 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-12-18 17:11:13 -0400 |
commit | ecd79dd69dad3474abf78085cbd401c227853b74 (patch) | |
tree | 471abdea8e27891072e0171b15a622f916cc1156 /Utility | |
parent | 09e3fc83f8e9a006cea239fabcff81692e938ddc (diff) |
check if wormhole is installed
Diffstat (limited to 'Utility')
-rw-r--r-- | Utility/MagicWormhole.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Utility/MagicWormhole.hs b/Utility/MagicWormhole.hs index 9ab804800..9a99cba33 100644 --- a/Utility/MagicWormhole.hs +++ b/Utility/MagicWormhole.hs @@ -20,6 +20,7 @@ module Utility.MagicWormhole ( WormHoleParams, sendFile, receiveFile, + isInstalled, ) where import Utility.Process @@ -28,6 +29,7 @@ import Utility.Monad import Utility.Misc import Utility.FileSystemEncoding import Utility.Env +import Utility.Path import System.IO import System.Exit @@ -153,3 +155,6 @@ runWormHoleProcess p consumer = ExitSuccess -> True ExitFailure _ -> False go h@(hin, hout, _) = consumer hin hout <&&> cleanup h + +isInstalled :: IO Bool +isInstalled = inPath "wormhole" |