Skip to content

Commit

Permalink
fixup! Add --install-cabal option for stack setup.
Browse files Browse the repository at this point in the history
  • Loading branch information
decentral1se committed Feb 19, 2017
1 parent c0942c6 commit 734dae4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Stack/Setup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ ensureCompiler sopts = do
unless needLocal $ do
$logWarn "Trying to change a Cabal library on a GHC not installed by stack."
$logWarn "This may fail, caveat emptor!"
upgradeCabal menv wc (fromJust cabalVersion)
forM_ cabalVersion (upgradeCabal menv wc)

case mtools of
Just (Just (ToolGhcjs cv), _) -> ensureGhcjsBooted menv cv (soptsInstallIfMissing sopts)
Expand Down Expand Up @@ -660,10 +660,10 @@ upgradeCabal menv wc cabalVersion = do
m <- unpackPackageIdents menv tmpdir Nothing (Map.singleton ident Nothing)

compilerPath <- join $ findExecutable menv (compilerExeName wc)
newestDir <- parseRelDir $ versionString version
versionDir <- parseRelDir $ versionString version
let installRoot = toFilePath $ parent (parent compilerPath)
</> $(mkRelDir "new-cabal")
</> newestDir
</> versionDir
dir <-
case Map.lookup ident m of
Nothing -> error "upgradeCabal: Invariant violated, dir missing"
Expand Down
2 changes: 1 addition & 1 deletion src/Stack/Types/Version.hs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ instance Exception VersionParseFail
instance Show VersionParseFail where
show (VersionParseFail bs) = "Invalid version: " ++ show bs

-- | A package version or the latest.
-- | A Package upgrade; Latest or a specific version.
data UpgradeTo = Specific Version | Latest deriving (Show)

-- | A package version.
Expand Down

0 comments on commit 734dae4

Please sign in to comment.