Apply suggestions from code review

Add @edolstra suggestion fixes.

Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
This commit is contained in:
Farid Zakaria 2024-07-15 09:12:56 -07:00 committed by GitHub
parent a4ce96e5f1
commit 945fff5674
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -529,17 +529,16 @@ static void prim_fetchurl(EvalState & state, const PosIdx pos, Value * * args, V
static RegisterPrimOp primop_fetchurl({
.name = "__fetchurl",
.args = {"args"},
.args = {"arg"},
.doc = R"(
If args is a URL, return the path of the downloaded file.
Otherwise, it can be an attribute with the following attributes
(all except url are optional):
Download the specified URL and return the path of the downloaded file.
`arg` can be either a string denoting the URL, or an attribute set with the following attributes:
- `url`
The URL of the file to download.
- `name` (default: `url without the protocol`)
- `name` (default: the last path component of the URL)
A name for the file in the store. This can be useful if the URL has any
characters that are invalid for the store.