Skip to content

Commit ea55955

Browse files
solMikolaj
authored andcommitted
Don't add extra-prog-path to ~/.config/cabal/config (#8951)
(when initially creating it)
1 parent 18c7e84 commit ea55955

File tree

4 files changed

+5
-17
lines changed

4 files changed

+5
-17
lines changed

cabal-install/src/Distribution/Client/Config.hs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,6 @@ initialSavedConfig :: IO SavedConfig
699699
initialSavedConfig = do
700700
cacheDir <- defaultCacheDir
701701
logsDir <- defaultLogsDir
702-
extraPath <- defaultExtraPath
703702
installPath <- defaultInstallPath
704703
return
705704
mempty
@@ -708,10 +707,6 @@ initialSavedConfig = do
708707
{ globalCacheDir = toFlag cacheDir
709708
, globalRemoteRepos = toNubList [defaultRemoteRepo]
710709
}
711-
, savedConfigureFlags =
712-
mempty
713-
{ configProgramPathExtra = toNubList extraPath
714-
}
715710
, savedInstallFlags =
716711
mempty
717712
{ installSummaryFile = toNubList [toPathTemplate (logsDir </> "build.log")]
@@ -810,16 +805,6 @@ defaultReportsDir :: IO FilePath
810805
defaultReportsDir =
811806
getDefaultDir XdgCache "reports"
812807

813-
defaultExtraPath :: IO [FilePath]
814-
defaultExtraPath = do
815-
mDir <- maybeGetCabalDir
816-
case mDir of
817-
Just dir ->
818-
return [dir </> "bin"]
819-
Nothing -> do
820-
dir <- getHomeDirectory
821-
return [dir </> ".local" </> "bin"]
822-
823808
defaultInstallPath :: IO FilePath
824809
defaultInstallPath = do
825810
mDir <- maybeGetCabalDir

cabal-install/tests/IntegrationTests2.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2012,7 +2012,7 @@ testConfigOptionComments = do
20122012
"-- extra-lib-dirs" @=? findLineWith True "extra-lib-dirs" defaultConfigFile
20132013
"-- extra-lib-dirs-static" @=? findLineWith True "extra-lib-dirs-static" defaultConfigFile
20142014
"-- extra-framework-dirs" @=? findLineWith True "extra-framework-dirs" defaultConfigFile
2015-
"extra-prog-path" @=? findLineWith False "extra-prog-path" defaultConfigFile
2015+
"-- extra-prog-path" @=? findLineWith False "extra-prog-path" defaultConfigFile
20162016
"-- instantiate-with" @=? findLineWith True "instantiate-with" defaultConfigFile
20172017
"-- tests" @=? findLineWith True "tests" defaultConfigFile
20182018
"-- coverage" @=? findLineWith True "coverage" defaultConfigFile

cabal-install/tests/IntegrationTests2/config/default-config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ remote-repo-cache: /home/colton/.cabal/packages
6363
-- extra-lib-dirs:
6464
-- extra-lib-dirs-static:
6565
-- extra-framework-dirs:
66-
extra-prog-path: /home/colton/.cabal/bin
66+
-- extra-prog-path:
6767
-- instantiate-with:
6868
-- tests: False
6969
-- coverage: False

changelog.d/issue-8951

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
synopsis: Don't add `extra-prog-path: ~/.local/bin` when initially creating `~/.config/cabal/config`
2+
packages: cabal-install
3+
issues: #8951

0 commit comments

Comments
 (0)