Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorLevente Polyak <anthraxx@archlinux.org>2024-02-29 00:43:26 +0100
committerChristian Heusel <christian@heusel.eu>2024-03-23 23:57:45 +0100
commitde0ea3b2f839c2f6ba074d7401d2a28118680da0 (patch)
treef21c27bb761fa15ac6bf92e23ded7036d67be885 /src/lib
parent81f5e7b3b3f6e2687ebca03e212e0e7bc2da171f (diff)
fix(version): do not prompt for input on terminal during check
In certain scenarios, like when an URL is checked that asks for credentials or other kind of input, the process blocks and waits for stdin input. This isn't particularly useful during scripted execution and in our cases also just an indicator for like a none existing GitHub repository. To avoid this situation, disable git terminal prompts. Component: pkgctl version check Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/version/check.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/version/check.sh b/src/lib/version/check.sh
index 6cd4a5b..ec90eb4 100644
--- a/src/lib/version/check.sh
+++ b/src/lib/version/check.sh
@@ -223,7 +223,7 @@ get_upstream_version() {
opts+=(--keyfile "${keyfile}")
fi
- if ! output=$(nvchecker --file "${config}" --logger json "${opts[@]}" 2>&1 | \
+ if ! output=$(GIT_TERMINAL_PROMPT=0 nvchecker --file "${config}" --logger json "${opts[@]}" 2>&1 | \
jq --raw-output 'select(.level != "debug")'); then
printf "failed to run nvchecker: %s" "${output}"
return 1