Skip to content

Commit

Permalink
warning when offline mode skips source-repository-packages
Browse files Browse the repository at this point in the history
i.e.
```
Warning: --offline was specified, skipping sync of repositories:
Warning: https://github.com/haskell/text.git
```
  • Loading branch information
peterbecich committed Mar 4, 2024
1 parent 3eefb5c commit a20e074
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cabal-install/src/Distribution/Client/ProjectConfig.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1374,13 +1374,16 @@ syncAndReadSourcePackagesRemoteRepos
-- For syncing we don't care about different 'SourceRepo' values that
-- are just different subdirs in the same repo.
-- Do not sync source repositories when `--offline` flag applied.
unless offlineMode $
if not offlineMode then
syncSourceRepos
verbosity
vcs
[ (repo, repoPath)
| (repo, _, repoPath) <- repoGroupWithPaths
]
else do
liftIO . warn verbosity $ "--offline was specified, skipping sync of repositories:"
liftIO . for_ repoGroupWithPaths $ \(repo,_,_) -> warn verbosity $ srpLocation repo

-- Run post-checkout-command if it is specified
for_ repoGroupWithPaths $ \(repo, _, repoPath) ->
Expand Down

0 comments on commit a20e074

Please sign in to comment.