From a20e07491a8182658df0c0b36ac4fce44cb97896 Mon Sep 17 00:00:00 2001 From: Peter Becich Date: Sun, 3 Mar 2024 17:12:53 -0800 Subject: [PATCH] warning when offline mode skips `source-repository-package`s i.e. ``` Warning: --offline was specified, skipping sync of repositories: Warning: https://github.com/haskell/text.git ``` --- cabal-install/src/Distribution/Client/ProjectConfig.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cabal-install/src/Distribution/Client/ProjectConfig.hs b/cabal-install/src/Distribution/Client/ProjectConfig.hs index 2b73660626d..e06d29250db 100644 --- a/cabal-install/src/Distribution/Client/ProjectConfig.hs +++ b/cabal-install/src/Distribution/Client/ProjectConfig.hs @@ -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) ->