Commit 8ee5c315 authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Fix the env var names used in the Paths module

Convert any '-' in the package name to '_' when generating the
path env var as most shells do not allow '-' in env var names.
parent 80a09641
......@@ -139,7 +139,10 @@ generate pkg_descr lbi =
mkGetEnvOr var expr = "catch (getEnv \""++var'++"\")"++
" (\\_ -> "++expr++")"
where var' = display (packageName pkg_descr) ++ "_" ++ var
where var' = showPkgName (packageName pkg_descr) ++ "_" ++ var
showPkgName = map fixchar . display
fixchar '-' = '_'
fixchar c = c
-- In several cases we cannot make relocatable installations
absolute =
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment