mirror of
https://github.com/nix-community/nixpkgs-update.git
synced 2024-11-25 09:34:13 +03:00
pass GITHUB_TOKEN to hub when cloning nixpkgs
This commit is contained in:
parent
42ef72dcbb
commit
f767bffb02
@ -56,7 +56,7 @@ main = do
|
||||
mode <- Opt.execParser programInfo
|
||||
options <- makeOptions
|
||||
updates <- T.readFile "packages-to-update.txt"
|
||||
setupNixpkgs
|
||||
setupNixpkgs options
|
||||
case mode of
|
||||
DeleteDone -> deleteDone options
|
||||
Update -> updateAll options updates
|
||||
|
@ -74,12 +74,15 @@ runtimeDir = do
|
||||
Right dir -> return dir
|
||||
Left e -> error $ T.unpack e
|
||||
|
||||
setupNixpkgs :: IO ()
|
||||
setupNixpkgs = do
|
||||
setupNixpkgs :: Options -> IO ()
|
||||
setupNixpkgs o = do
|
||||
fp <- getUserCacheDir "nixpkgs"
|
||||
exists <- doesDirectoryExist fp
|
||||
unless exists $ do
|
||||
_ <- shelly $ run "hub" ["clone", "nixpkgs", T.pack fp] -- requires that user has forked nixpkgs
|
||||
_ <-
|
||||
shelly $ do
|
||||
setenv "GITHUB_TOKEN" (githubToken o)
|
||||
run "hub" ["clone", "nixpkgs", T.pack fp] -- requires that user has forked nixpkgs
|
||||
setCurrentDirectory fp
|
||||
_ <-
|
||||
shelly $
|
||||
|
Loading…
Reference in New Issue
Block a user