Skip to content

Commit

Permalink
Don't add extra-prog-path to ~/.config/cabal/config (haskell#8951)
Browse files Browse the repository at this point in the history
(when initially creating it)
  • Loading branch information
sol authored and Mikolaj committed Jun 20, 2023
1 parent e1a10bd commit c6c2627
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 17 deletions.
15 changes: 0 additions & 15 deletions cabal-install/src/Distribution/Client/Config.hs
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,6 @@ initialSavedConfig :: IO SavedConfig
initialSavedConfig = do
cacheDir <- defaultCacheDir
logsDir <- defaultLogsDir
extraPath <- defaultExtraPath
installPath <- defaultInstallPath
return
mempty
Expand All @@ -708,10 +707,6 @@ initialSavedConfig = do
{ globalCacheDir = toFlag cacheDir
, globalRemoteRepos = toNubList [defaultRemoteRepo]
}
, savedConfigureFlags =
mempty
{ configProgramPathExtra = toNubList extraPath
}
, savedInstallFlags =
mempty
{ installSummaryFile = toNubList [toPathTemplate (logsDir </> "build.log")]
Expand Down Expand Up @@ -810,16 +805,6 @@ defaultReportsDir :: IO FilePath
defaultReportsDir =
getDefaultDir XdgCache "reports"

defaultExtraPath :: IO [FilePath]
defaultExtraPath = do
mDir <- maybeGetCabalDir
case mDir of
Just dir ->
return [dir </> "bin"]
Nothing -> do
dir <- getHomeDirectory
return [dir </> ".local" </> "bin"]

defaultInstallPath :: IO FilePath
defaultInstallPath = do
mDir <- maybeGetCabalDir
Expand Down
2 changes: 1 addition & 1 deletion cabal-install/tests/IntegrationTests2.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2012,7 +2012,7 @@ testConfigOptionComments = do
"-- extra-lib-dirs" @=? findLineWith True "extra-lib-dirs" defaultConfigFile
"-- extra-lib-dirs-static" @=? findLineWith True "extra-lib-dirs-static" defaultConfigFile
"-- extra-framework-dirs" @=? findLineWith True "extra-framework-dirs" defaultConfigFile
"extra-prog-path" @=? findLineWith False "extra-prog-path" defaultConfigFile
"-- extra-prog-path" @=? findLineWith False "extra-prog-path" defaultConfigFile
"-- instantiate-with" @=? findLineWith True "instantiate-with" defaultConfigFile
"-- tests" @=? findLineWith True "tests" defaultConfigFile
"-- coverage" @=? findLineWith True "coverage" defaultConfigFile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ remote-repo-cache: /home/colton/.cabal/packages
-- extra-lib-dirs:
-- extra-lib-dirs-static:
-- extra-framework-dirs:
extra-prog-path: /home/colton/.cabal/bin
-- extra-prog-path:
-- instantiate-with:
-- tests: False
-- coverage: False
Expand Down
3 changes: 3 additions & 0 deletions changelog.d/issue-8951
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
synopsis: Don't add `extra-prog-path: ~/.local/bin` when initially creating `~/.config/cabal/config`
packages: cabal-install
issues: #8951

0 comments on commit c6c2627

Please sign in to comment.