From 2f5315b3c32fbd23ebce05da80712183dc259b7c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 5 May 2017 14:27:39 -0400 Subject: standalone tarball Adapted the standalone tarball building code from git-annex. --- ControlWindow.hs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'ControlWindow.hs') diff --git a/ControlWindow.hs b/ControlWindow.hs index 4f806c9..c5a6be9 100644 --- a/ControlWindow.hs +++ b/ControlWindow.hs @@ -67,7 +67,7 @@ openControlWindow = do ichan <- newTMChanIO ochan <- newTMChanIO _ <- async $ serveControlSocket soc ichan ochan - myexe <- getExecutablePath + myexe <- getMyExe mproc <- runInVirtualTerminal winDesc myexe ["--control"] let cannotrun = do putStrLn "You need to open another shell prompt, and run: debug-me --control" @@ -83,6 +83,13 @@ openControlWindow = do Left (Just ControlWindowOpened) -> return (ichan, ochan) Left _ -> error "unexpected message from control process" Right _ -> cannotrun + + +-- | Get path to debug-me program. +-- +-- The standalone bundle sets DEBUG_ME_EXE to the path to use. +getMyExe :: IO FilePath +getMyExe = maybe getExecutablePath return =<< lookupEnv "DEBUG_ME_EXE" type Prompt = () type Response = String -- cgit v1.2.3