Commit 9d59e40e authored by Edward Z. Yang's avatar Edward Z. Yang
Browse files

Give a message that --root-cmd is not supported and --global is deprecated.


Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
parent aff83e61
......@@ -248,6 +248,7 @@ instance Semigroup SavedConfig where
installUpgradeDeps = combine installUpgradeDeps,
installOnly = combine installOnly,
installOnlyDeps = combine installOnlyDeps,
installRootCmd = combine installRootCmd,
installSummaryFile = lastNonEmptyNL installSummaryFile,
installLogFile = combine installLogFile,
installBuildReports = combine installBuildReports,
......
......@@ -211,6 +211,11 @@ install verbosity packageDBs repos comp platform conf useSandbox mSandboxPkgInfo
globalFlags configFlags configExFlags installFlags haddockFlags
userTargets0 = do
unless (installRootCmd installFlags == Cabal.NoFlag) $
die "--root-cmd is no longer supported, see https://github.com/haskell/cabal/issues/3353"
unless (fromFlag (configUserInstall configFlags)) $
warn verbosity "the --global flag is deprecated--it is generally considered a bad idea to install packages into the global store"
installContext <- makeInstallContext verbosity args (Just userTargets0)
planResult <- foldProgress logMsg (return . Left) (return . Right) =<<
makeInstallPlan verbosity args installContext
......
......@@ -402,6 +402,7 @@ convertLegacyBuildOnlyFlags globalFlags configFlags
installDryRun = projectConfigDryRun,
installOnly = _,
installOnlyDeps = projectConfigOnlyDeps,
installRootCmd = _,
installSummaryFile = projectConfigSummaryFile,
installLogFile = projectConfigLogFile,
installBuildReports = projectConfigBuildReports,
......@@ -498,6 +499,7 @@ convertToLegacySharedConfig
installStrongFlags = projectConfigStrongFlags,
installOnly = mempty,
installOnlyDeps = projectConfigOnlyDeps,
installRootCmd = mempty, --no longer supported
installSummaryFile = projectConfigSummaryFile,
installLogFile = projectConfigLogFile,
installBuildReports = projectConfigBuildReports,
......
......@@ -1153,6 +1153,7 @@ data InstallFlags = InstallFlags {
installUpgradeDeps :: Flag Bool,
installOnly :: Flag Bool,
installOnlyDeps :: Flag Bool,
installRootCmd :: Flag String,
installSummaryFile :: NubList PathTemplate,
installLogFile :: Flag PathTemplate,
installBuildReports :: Flag ReportLevel,
......@@ -1183,6 +1184,7 @@ defaultInstallFlags = InstallFlags {
installUpgradeDeps = Flag False,
installOnly = Flag False,
installOnlyDeps = Flag False,
installRootCmd = mempty,
installSummaryFile = mempty,
installLogFile = mempty,
installBuildReports = Flag NoReports,
......@@ -1352,6 +1354,11 @@ installOptions showOrParseArgs =
installOnlyDeps (\v flags -> flags { installOnlyDeps = v })
(yesNoOpt showOrParseArgs)
, option [] ["root-cmd"]
"(No longer supported, do not use.)"
installRootCmd (\v flags -> flags { installRootCmd = v })
(reqArg' "COMMAND" toFlag flagToList)
, option [] ["symlink-bindir"]
"Add symlinks to installed executables into this directory."
installSymlinkBinDir (\v flags -> flags { installSymlinkBinDir = v })
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment