Commit 5327953
committed
Log fetchers as they're run
It's very difficult to figure out which error messages are fatal or even
which fetchers they correspond to. To fix this, we print the command
we're going to run to attempt a fetch for each fetcher we try.
Before:
```
$ cabal2nix https://github.com/iand675/hs-sqlcommenter.git
error: failed to open archive: Unrecognized archive format
Initialized empty Git repository in /private/tmp/git-checkout-tmp-REpu3aRm/hs-sqlcommenter/.git/
remote: Enumerating objects: 16, done.
remote: Counting objects: 100% (16/16), done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 16 (delta 0), reused 16 (delta 0), pack-reused 0 (from 0)
Unpacking objects: 100% (16/16), 14.14 KiB | 1.18 MiB/s, done.
From https://github.com/iand675/hs-sqlcommenter
* branch HEAD -> FETCH_HEAD
Switched to a new branch 'fetchgit'
removing `.git'...
error: path '/tmp' is a symlink
abort: 'https://github.com/iand675/hs-sqlcommenter.git' does not appear to be an hg repository:
---%<--- (text/html; charset=utf-8)
...
```
After:
```
$ cabal2nix https://github.com/iand675/hs-sqlcommenter.git
$ nix-prefetch-url https://github.com/iand675/hs-sqlcommenter.git
$ nix-prefetch-url --unpack https://github.com/iand675/hs-sqlcommenter.git
error: failed to open archive: Unrecognized archive format
[0.1 MiB DL] $ nix-prefetch-git --fetch-submodules https://github.com/iand675/hs-sqlcommenter.git
Initialized empty Git repository in /private/tmp/git-checkout-tmp-DRzhuqlX/hs-sqlcommenter/.git/
remote: Enumerating objects: 16, done.
remote: Counting objects: 100% (16/16), done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 16 (delta 0), reused 16 (delta 0), pack-reused 0 (from 0)
Unpacking objects: 100% (16/16), 14.14 KiB | 336.00 KiB/s, done.
From https://github.com/iand675/hs-sqlcommenter
* branch HEAD -> FETCH_HEAD
Switched to a new branch 'fetchgit'
removing `.git'...
error: path '/tmp' is a symlink
$ nix-prefetch-hg https://github.com/iand675/hs-sqlcommenter.git
abort: 'https://github.com/iand675/hs-sqlcommenter.git' does not appear to be an hg repository:
---%<--- (text/html; charset=utf-8)
...
```1 parent 706caab commit 5327953
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| 239 | + | |
| 240 | + | |
239 | 241 | | |
240 | 242 | | |
241 | 243 | | |
| |||
0 commit comments