diff options
author | Levente Polyak <anthraxx@archlinux.org> | 2024-02-29 00:43:26 +0100 |
---|---|---|
committer | Christian Heusel <christian@heusel.eu> | 2024-03-23 23:57:45 +0100 |
commit | de0ea3b2f839c2f6ba074d7401d2a28118680da0 (patch) | |
tree | f21c27bb761fa15ac6bf92e23ded7036d67be885 | |
parent | 81f5e7b3b3f6e2687ebca03e212e0e7bc2da171f (diff) | |
download | devtools-de0ea3b2f839c2f6ba074d7401d2a28118680da0.tar.xz |
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>
-rw-r--r-- | src/lib/version/check.sh | 2 |
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 |