projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
015d099
)
Catch any exceptions thrown by getEnv; fixes #1704
author
Ian Lynagh
<igloo@earth.li>
Tue, 18 Sep 2007 21:57:52 +0000
(21:57 +0000)
committer
Ian Lynagh
<igloo@earth.li>
Tue, 18 Sep 2007 21:57:52 +0000
(21:57 +0000)
compiler/ghci/InteractiveUI.hs
patch
|
blob
|
history
diff --git
a/compiler/ghci/InteractiveUI.hs
b/compiler/ghci/InteractiveUI.hs
index
e0fddac
..
6d7bcfb
100644
(file)
--- a/
compiler/ghci/InteractiveUI.hs
+++ b/
compiler/ghci/InteractiveUI.hs
@@
-1811,8
+1811,9
@@
findBreakByCoord mb_file (line, col) arr
-- TERM to vt100 for other reasons) we get carets.
-- We really ought to use a proper termcap/terminfo library.
do_bold :: Bool
-do_bold = unsafePerformIO (System.Environment.getEnv "TERM") `elem`
- ["xterm", "linux"]
+do_bold = unsafePerformIO mTerm `elem` ["xterm", "linux"]
+ where mTerm = System.Environment.getEnv "TERM"
+ `Exception.catch` \e -> return "TERM not set"
start_bold :: String
start_bold = "\ESC[1m"