Skip to content

Commit a20e074

Browse files
committed
warning when offline mode skips source-repository-packages
i.e. ``` Warning: --offline was specified, skipping sync of repositories: Warning: https://github.com/haskell/text.git ```
1 parent 3eefb5c commit a20e074

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cabal-install/src/Distribution/Client/ProjectConfig.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1374,13 +1374,16 @@ syncAndReadSourcePackagesRemoteRepos
13741374
-- For syncing we don't care about different 'SourceRepo' values that
13751375
-- are just different subdirs in the same repo.
13761376
-- Do not sync source repositories when `--offline` flag applied.
1377-
unless offlineMode $
1377+
if not offlineMode then
13781378
syncSourceRepos
13791379
verbosity
13801380
vcs
13811381
[ (repo, repoPath)
13821382
| (repo, _, repoPath) <- repoGroupWithPaths
13831383
]
1384+
else do
1385+
liftIO . warn verbosity $ "--offline was specified, skipping sync of repositories:"
1386+
liftIO . for_ repoGroupWithPaths $ \(repo,_,_) -> warn verbosity $ srpLocation repo
13841387

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

0 commit comments

Comments
 (0)