diff options
| author | Danilo M. <danix@danix.xyz> | 2026-06-13 18:33:34 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-06-13 18:33:34 +0200 |
| commit | 8e6531764b00b29259fc59bd4e1f16e019bc3f2a (patch) | |
| tree | 1f8bc043687aa3e8fa079f95deee5a5e15036d79 /mkhint | |
| parent | 1be322b71ef7ff19cff6e35551c1a1cc240ca52d (diff) | |
| download | mkhintfile-8e6531764b00b29259fc59bd4e1f16e019bc3f2a.tar.gz mkhintfile-8e6531764b00b29259fc59bd4e1f16e019bc3f2a.zip | |
fix: resolve relative nvchecker keyfile path against config dir
nvchecker resolves a relative oldver/newver/keyfile path against the config
file's directory, not the CWD. _nvchecker_newver_path returned the raw
relative string (e.g. "new_ver.json"), so nvchecker_latest's [[ -f ]] check
ran against whatever CWD 'mkhint -C' was launched from — almost never the
config dir. Result: every package reported 'no nvchecker result' and the run
said 'all up to date' despite nvchecker having found updates.
Resolve non-absolute keyfile paths against dirname(NVCHECKER_CONFIG). T35
covers a relative newver path with the keyfile beside the config.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'mkhint')
| -rwxr-xr-x | mkhint | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -155,6 +155,11 @@ _nvchecker_newver_path() { [[ -z "$path" ]] && return 1 # expand a leading ~ to $HOME path="${path/#\~/$HOME}" + # nvchecker resolves a relative keyfile path against the config file's + # directory (not the CWD), so do the same here. + if [[ "$path" != /* ]]; then + path="$(dirname "$NVCHECKER_CONFIG")/$path" + fi printf '%s\n' "$path" } |
