chore: pass all options to download
All checks were successful
Pre-commit / pre-commit (pull_request) Successful in 5m26s
Update alr-git / changelog (push) Successful in 24s

This commit is contained in:
2025-06-25 19:52:54 +03:00
parent 5e1eeabd04
commit 401c41160c
4 changed files with 16 additions and 26 deletions

View File

@ -11,7 +11,7 @@
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"> <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="33.5" y="15" fill="#010101" fill-opacity=".3">coverage</text> <text x="33.5" y="15" fill="#010101" fill-opacity=".3">coverage</text>
<text x="33.5" y="14">coverage</text> <text x="33.5" y="14">coverage</text>
<text x="86" y="15" fill="#010101" fill-opacity=".3">19.7%</text> <text x="86" y="15" fill="#010101" fill-opacity=".3">19.8%</text>
<text x="86" y="14">19.7%</text> <text x="86" y="14">19.8%</text>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 926 B

After

Width:  |  Height:  |  Size: 926 B

View File

@ -445,15 +445,15 @@ msgstr ""
msgid "Source can be updated, updating if required" msgid "Source can be updated, updating if required"
msgstr "" msgstr ""
#: pkg/dl/dl.go:201 #: pkg/dl/dl.go:196
msgid "Source found in cache and linked to destination" msgid "Source found in cache and linked to destination"
msgstr "" msgstr ""
#: pkg/dl/dl.go:208 #: pkg/dl/dl.go:203
msgid "Source updated and linked to destination" msgid "Source updated and linked to destination"
msgstr "" msgstr ""
#: pkg/dl/dl.go:222 #: pkg/dl/dl.go:217
msgid "Downloading source" msgid "Downloading source"
msgstr "" msgstr ""

View File

@ -461,15 +461,15 @@ msgstr "Ошибка при запуске приложения"
msgid "Source can be updated, updating if required" msgid "Source can be updated, updating if required"
msgstr "Исходный код можно обновлять, обновляя при необходимости" msgstr "Исходный код можно обновлять, обновляя при необходимости"
#: pkg/dl/dl.go:201 #: pkg/dl/dl.go:196
msgid "Source found in cache and linked to destination" msgid "Source found in cache and linked to destination"
msgstr "Источник найден в кэше и связан с пунктом назначения" msgstr "Источник найден в кэше и связан с пунктом назначения"
#: pkg/dl/dl.go:208 #: pkg/dl/dl.go:203
msgid "Source updated and linked to destination" msgid "Source updated and linked to destination"
msgstr "Источник обновлён и связан с пунктом назначения" msgstr "Источник обновлён и связан с пунктом назначения"
#: pkg/dl/dl.go:222 #: pkg/dl/dl.go:217
msgid "Downloading source" msgid "Downloading source"
msgstr "Скачивание источника" msgstr "Скачивание источника"

View File

@ -172,15 +172,10 @@ func Download(ctx context.Context, opts Options) (err error) {
"downloader", d.Name(), "downloader", d.Name(),
) )
updated, err = d.Update(Options{ newOpts := opts
Hash: opts.Hash, newOpts.Destination = cacheDir
HashAlgorithm: opts.HashAlgorithm,
Name: opts.Name, updated, err = d.Update(newOpts)
URL: opts.URL,
Destination: cacheDir,
Progress: opts.Progress,
LocalDir: opts.LocalDir,
})
if err != nil { if err != nil {
return err return err
} }
@ -226,15 +221,10 @@ func Download(ctx context.Context, opts Options) (err error) {
return err return err
} }
t, name, err := d.Download(ctx, Options{ newOpts := opts
Hash: opts.Hash, newOpts.Destination = cacheDir
HashAlgorithm: opts.HashAlgorithm,
Name: opts.Name, t, name, err := d.Download(ctx, newOpts)
URL: opts.URL,
Destination: cacheDir,
Progress: opts.Progress,
LocalDir: opts.LocalDir,
})
if err != nil { if err != nil {
return err return err
} }