diff options
| author | Danilo M. <danix@danix.xyz> | 2026-06-19 10:26:22 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-06-19 10:26:22 +0200 |
| commit | e9730f8eaed88cc742e6db34786b19bb712b5866 (patch) | |
| tree | 82a0756ff1f6c131a5c68a9c04a9836c98f28115 /mkhint | |
| parent | f2f19227b14d5a342fdfb48f7d67914d947160a9 (diff) | |
| download | mkhintfile-e9730f8eaed88cc742e6db34786b19bb712b5866.tar.gz mkhintfile-e9730f8eaed88cc742e6db34786b19bb712b5866.zip | |
When --check is given exactly one package, and when --hintfile suggests a
version without -v, run `nvchecker -e <pkg>` so only that entry is scanned
instead of the whole nvchecker.toml. Two+ packages or no args still do one
full scan, since nvchecker -e accepts only a single entry.
Add T42/T43 (mock nvchecker now logs its args), and update CLAUDE.md and
README.md (including the previously undocumented -R/--review and -l highlight).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'mkhint')
| -rwxr-xr-x | mkhint | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -509,8 +509,9 @@ build_multiline_value() { suggest_version() { local pkg="$1" - # Refresh nvchecker results (stderr only; keep stdout clean for the echo) - nvchecker -c "$NVCHECKER_CONFIG" >&2 || true + # Refresh nvchecker results (stderr only; keep stdout clean for the echo). + # -e limits the run to this entry instead of scanning the whole config. + nvchecker -c "$NVCHECKER_CONFIG" -e "$pkg" >&2 || true local latest latest=$(nvchecker_latest "$pkg") || { @@ -731,9 +732,14 @@ check_updates() { done fi - # Refresh nvchecker results once for everything + # Refresh nvchecker results. With exactly one explicit target, -e limits + # the run to that entry; otherwise scan the whole config in one pass. echo "Running nvchecker..." - nvchecker -c "$NVCHECKER_CONFIG" >&2 || true + if [[ ${#targets[@]} -eq 1 && $# -gt 0 ]]; then + nvchecker -c "$NVCHECKER_CONFIG" -e "${targets[0]}" >&2 || true + else + nvchecker -c "$NVCHECKER_CONFIG" >&2 || true + fi # Classify each target local outdated_pkgs=() outdated_old=() outdated_new=() outdated_flag=() |
