Skip to content

Commit 84fed67

Browse files
authored
Add info when init with cached Nixpkgs (#402)
#384
1 parent 0ca27c5 commit 84fed67

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Niv/Cli.hs

+9
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,15 @@ cmdInit nixpkgs = do
230230
tbold (T.pack fp) <> "."
231231
]
232232
]
233+
case nixpkgs of
234+
NixpkgsFast ->
235+
tsay $
236+
T.unlines
237+
[ "",
238+
tbold (tblue "INFO: ") <> "`niv init` didn't fetch the latest commit for nixpkgs (due to --fast).",
239+
" Run `niv update nixpkgs` if you wish to pin the latest."
240+
]
241+
_ -> pure ()
233242
where
234243
createFile :: FilePath -> B.ByteString -> NIO ()
235244
createFile path content = li $ do

0 commit comments

Comments
 (0)