From aabe56252fcceb58f2f3f80451bba7ca13109266 Mon Sep 17 00:00:00 2001 From: Patrick Augusto <ptkato.irl@gmail.com> Date: Wed, 2 Jun 2021 01:33:31 -0300 Subject: [PATCH] Fixing the flag boolean and the fixtures dir name --- cabal-install/src/Distribution/Client/CmdConfigure.hs | 2 +- cabal-install/tests/UnitTests/Distribution/Client/Configure.hs | 2 +- .../tests/fixtures/{reconfigure => configure}/cabal.project | 0 .../fixtures/{reconfigure => configure}/cabal.project.local | 0 4 files changed, 2 insertions(+), 2 deletions(-) rename cabal-install/tests/fixtures/{reconfigure => configure}/cabal.project (100%) rename cabal-install/tests/fixtures/{reconfigure => configure}/cabal.project.local (100%) diff --git a/cabal-install/src/Distribution/Client/CmdConfigure.hs b/cabal-install/src/Distribution/Client/CmdConfigure.hs index bb65a354e0..f8548699ef 100644 --- a/cabal-install/src/Distribution/Client/CmdConfigure.hs +++ b/cabal-install/src/Distribution/Client/CmdConfigure.hs @@ -106,7 +106,7 @@ configureAction' flags@NixStyleFlags {..} _extraArgs globalFlags = do appends = fromFlagOrDefault False $ configAppend configExFlags backupFile = localFile <> "~" - when (exists && not backups) $ do + when (exists && backups) $ do notice v $ quote (takeFileName localFile) <> " already exists, backing it up to " <> quote (takeFileName backupFile) <> "." diff --git a/cabal-install/tests/UnitTests/Distribution/Client/Configure.hs b/cabal-install/tests/UnitTests/Distribution/Client/Configure.hs index 3718189e7d..db90a8d72d 100644 --- a/cabal-install/tests/UnitTests/Distribution/Client/Configure.hs +++ b/cabal-install/tests/UnitTests/Distribution/Client/Configure.hs @@ -97,4 +97,4 @@ configureTests = testGroup "Configure tests" ] projectFile :: FilePath -projectFile = "tests" </> "fixtures" </> "reconfigure" </> "cabal.project" +projectFile = "tests" </> "fixtures" </> "configure" </> "cabal.project" diff --git a/cabal-install/tests/fixtures/reconfigure/cabal.project b/cabal-install/tests/fixtures/configure/cabal.project similarity index 100% rename from cabal-install/tests/fixtures/reconfigure/cabal.project rename to cabal-install/tests/fixtures/configure/cabal.project diff --git a/cabal-install/tests/fixtures/reconfigure/cabal.project.local b/cabal-install/tests/fixtures/configure/cabal.project.local similarity index 100% rename from cabal-install/tests/fixtures/reconfigure/cabal.project.local rename to cabal-install/tests/fixtures/configure/cabal.project.local -- GitLab