Skip to content

Commit

Permalink
Improve message and its formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsmeding authored and Mikolaj committed Apr 16, 2024
1 parent 49d02cf commit 4290dc2
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions cabal-install/src/Distribution/Client/CmdInstall.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1002,22 +1002,23 @@ installLibraries
when showWarning $
warn verbosity $
"The libraries were installed by creating a global GHC environment file at:\n"
++ " "
++ envFile
++ envFile ++ "\n"
++ "\n"
++ "The presence of such an environment file is likely to confuse other tools\n"
++ "because it changes GHC's behaviour: it changes the default package set in ghc\n"
++ "and ghci from its normal value (which is \"all boot libraries\"), and because GHC\n"
++ "environment files are little-used, other tools might break because of it.\n"
++ "The presence of such an environment file is likely to confuse or break other "
++ "tools because it changes GHC's behaviour: it changes the default package set in "
++ "ghc and ghci from its normal value (which is \"all boot libraries\"). GHC "
++ "environment files are little-used and often not tested for.\n"
++ "\n"
++ "Furthermore, management of these environment files is still more difficult than\n"
++ "Furthermore, management of these environment files is still more difficult than "
++ "it could be; see e.g. https://github.com/haskell/cabal/issues/6481 .\n"
++ "\n"
++ "Double-check that creating a global GHC environment file is really what you\n"
++ "wanted! You can limit the effects of the environment by creating it in a\n"
++ "Double-check that creating a global GHC environment file is really what you "
++ "wanted! You can limit the effects of the environment file by creating it in a "
++ "specific directory using the --package-env flag. For example, use:\n"
++ " cabal install --lib <packages...> --package-env .\n"
++ "to create the file in the current directory.\n"
++ "\n"
++ "cabal install --lib <packages...> --package-env .\n"
++ "\n"
++ "to create the file in the current directory."
else
warn verbosity $
"The current compiler doesn't support safely installing libraries, "
Expand Down

0 comments on commit 4290dc2

Please sign in to comment.