mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-07 13:06:59 +02:00
build_library/board_options: Fix pkg_version function
The documentation says it always returns zero, which is not true - portageq could return a non-zero return value and that would be the return value of the function. Fix the function to actually follow the documentation - apparently the function should just return an empty string in case of failure (like package not found).
This commit is contained in:
parent
b797cdb723
commit
d801ecccdf
@ -29,7 +29,7 @@ pkg_use_enabled() {
|
||||
# Prints: some-pkg/name-1.2.3
|
||||
# Note: returns 0 even if the package was not found.
|
||||
pkg_version() {
|
||||
portageq-"${BOARD}" best_visible "${BOARD_ROOT}" "$1" "$2"
|
||||
portageq-"${BOARD}" best_visible "${BOARD_ROOT}" "$1" "$2" || :
|
||||
}
|
||||
|
||||
# Usage: pkg_provides [installed|binary] some-pkg/name-1.2.3
|
||||
|
Loading…
Reference in New Issue
Block a user