Skip to content

Commit

Permalink
Don't look in Git repo for SHAs when using HTTPS
Browse files Browse the repository at this point in the history
This ensures a better error message when the Git SHA isn't found,
warning that it isn't in the tarball instead of not being in the Git
repo.
  • Loading branch information
snoyberg committed Jan 11, 2017
1 parent c495677 commit c05e0ab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/Stack/Fetch.hs
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,9 @@ withCabalFiles name pkgs f = do
$logWarn $ mconcat
[ "Did not find .cabal file for "
, T.pack $ packageIdentifierString ident
, " with Git SHA of "
, " with SHA of "
, decodeUtf8 sha
, " in the Git repository"
]
$logDebug (T.pack (show e))
goPkg h Nothing (ident, pc, Nothing, tf)
Expand All @@ -337,7 +338,7 @@ withCabalFiles name pkgs f = do
Just (GitSHA1 sha) -> $logWarn $ mconcat
[ "Did not find .cabal file for "
, T.pack $ packageIdentifierString ident
, " with Git SHA of "
, " with SHA of "
, decodeUtf8 sha
, " in tarball-based cache"
]
Expand Down
4 changes: 3 additions & 1 deletion src/Stack/Types/Config.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1175,7 +1175,9 @@ configPackageIndexRepo name = do
case indexLocation index of
ILGit x -> Just x
ILHttp _ -> Nothing
ILGitHttp x _ -> Just x
-- See logic in updateIndex, which prefers
-- HTTP to Git in this case
ILGitHttp _ _ -> Nothing
case murl of
Nothing -> return Nothing
Just url -> do
Expand Down

0 comments on commit c05e0ab

Please sign in to comment.