Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
c1cc5200
Commit
c1cc5200
authored
Sep 05, 2013
by
Mikhail Glushenkov
Browse files
sandbox init: warn instead of dying if there's a cabal-dev sandbox.
Fixes #1472.
parent
03d12e64
Changes
1
Show whitespace changes
Inline
Side-by-side
cabal-install/Distribution/Client/Sandbox.hs
View file @
c1cc5200
...
...
@@ -275,14 +275,14 @@ dumpPackageEnvironment verbosity _sandboxFlags globalFlags = do
-- | Entry point for the 'cabal sandbox-init' command.
sandboxInit
::
Verbosity
->
SandboxFlags
->
GlobalFlags
->
IO
()
sandboxInit
verbosity
sandboxFlags
globalFlags
=
do
--
Check that there is no
'cabal-dev'
directory
.
--
Warn if there's a
'cabal-dev'
sandbox
.
isCabalDevSandbox
<-
liftM2
(
&&
)
(
doesDirectoryExist
"cabal-dev"
)
(
doesFileExist
$
"cabal-dev"
</>
"cabal.config"
)
when
isCabalDevSandbox
$
die
$
warn
verbosity
$
"You are apparently using a legacy (cabal-dev) sandbox. "
++
"
To use native cabal sandboxing, please delete the 'cabal-dev' directory
"
++
"and run 'cabal sandbox init'
."
++
"
Legacy sandboxes may interact badly with native Cabal sandboxes.
"
++
"You may want to delete the 'cabal-dev' directory to prevent issues
."
-- Create the sandbox directory.
let
sandboxDir'
=
fromFlagOrDefault
defaultSandboxLocation
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment