cabal-4

Cabal supports a dry-run-feature, which runs a subset of the specified commands.The '--dry-run' did not actually dry-run for commands 'v2-configure', 'v2-freeze', 'v2-run', and 'v2-exec'. Instead, the dry-run flag was ignored and the commands did perform a few actions. The fix is to add if-expressions where needed in the commands' code to perform the dry-run as expected.

ghc-version: 8.10.7

hasbugs-version: 1.0.0

license: BSD-3

build-framework: stack

Repository
GitHub Artifacts :

Faults @aabe5625

[
  {
    "endline": 94,
    "file": "cabal-install/src/Distribution/Client/CmdConfigure.hs",
    "function": "configureAction",
    "module": "Distribution.Client.CmdConfigure",
    "startline": 92
  },
  {
    "endline": 104,
    "file": "cabal-install/src/Distribution/Client/CmdConfigure.hs",
    "function": "configureAction'",
    "module": "Distribution.Client.CmdConfigure",
    "startline": 104
  },
  {
    "endline": 121,
    "file": "cabal-install/src/Distribution/Client/CmdConfigure.hs",
    "function": "configureAction'",
    "module": "Distribution.Client.CmdConfigure",
    "startline": 109
  },
  {
    "endline": 188,
    "file": "cabal-install/src/Distribution/Client/CmdExec.hs",
    "function": "execAction",
    "module": "Distribution.Client.CmdExec",
    "startline": 188
  },
  {
    "endline": 121,
    "file": "cabal-install/src/Distribution/Client/CmdFreeze.hs",
    "function": "freezeAction",
    "module": "Distribution.Client.CmdFreeze",
    "startline": 119
  },
  {
    "endline": 294,
    "file": "cabal-install/src/Distribution/Client/CmdRun.hs",
    "function": "runAction",
    "module": "Distribution.Client.CmdRun",
    "startline": 286
  }
]

Fixes @84884bbc

[
  {
    "endline": 99,
    "file": "cabal-install/src/Distribution/Client/CmdConfigure.hs",
    "function": "configureAction",
    "module": "Distribution.Client.CmdConfigure",
    "startline": 92
  },
  {
    "endline": 131,
    "file": "cabal-install/src/Distribution/Client/CmdConfigure.hs",
    "function": "configureAction'",
    "module": "Distribution.Client.CmdConfigure",
    "startline": 113
  },
  {
    "endline": 142,
    "file": "cabal-install/src/Distribution/Client/CmdConfigure.hs",
    "function": "shouldNotWriteFile",
    "module": "Distribution.Client.CmdConfigure",
    "startline": 137
  },
  {
    "endline": 195,
    "file": "cabal-install/src/Distribution/Client/CmdExec.hs",
    "function": "execAction",
    "module": "Distribution.Client.CmdExec",
    "startline": 190
  },
  {
    "endline": 110,
    "file": "cabal-install/src/Distribution/Client/CmdFreeze.hs",
    "function": "freezeAction",
    "module": "Distribution.Client.CmdFreeze",
    "startline": 109
  },
  {
    "endline": 128,
    "file": "cabal-install/src/Distribution/Client/CmdFreeze.hs",
    "function": "freezeAction",
    "module": "Distribution.Client.CmdFreeze",
    "startline": 120
  },
  {
    "endline": 300,
    "file": "cabal-install/src/Distribution/Client/CmdRun.hs",
    "function": "runAction",
    "module": "Distribution.Client.CmdRun",
    "startline": 286
  }
]