Skip to content

Commit 6d993e2

Browse files
committed
Degrade root-cmd error to warning.
shayan_ on IRC reported that if you had root-cmd set in your .cabal/config, cabal install would always fail to run. That's bad, esp. because root-cmd would only have an effect when --global was passed. Downgrade the warning. Signed-off-by: Edward Z. Yang <[email protected]>
1 parent 8d2229a commit 6d993e2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cabal-install/Distribution/Client/Install.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,10 @@ install verbosity packageDBs repos comp platform progdb useSandbox mSandboxPkgIn
210210
userTargets0 = do
211211

212212
unless (installRootCmd installFlags == Cabal.NoFlag) $
213-
die $ "--root-cmd is no longer supported, "
213+
warn verbosity $ "--root-cmd is no longer supported, "
214214
++ "see https://github.com/haskell/cabal/issues/3353"
215+
++ " (if you didn't type --root-cmd, comment out root-cmd"
216+
++ " in your ~/.cabal/config file)"
215217
unless (fromFlag (configUserInstall configFlags)) $
216218
warn verbosity $ "the --global flag is deprecated -- "
217219
++ "it is generally considered a bad idea to install packages "

0 commit comments

Comments
 (0)