From 893a361666000f20d546651a5d8a114c5238f9f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= Date: Tue, 30 Jun 2026 15:07:40 +0200 Subject: [PATCH] Fixup for the "alts" support --- package/yast-ci-ruby | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/yast-ci-ruby b/package/yast-ci-ruby index 5fb56e7..94876cd 100755 --- a/package/yast-ci-ruby +++ b/package/yast-ci-ruby @@ -189,11 +189,11 @@ function dump_settings() { function set_rubocop_version() { # here we need to set path exactly as update-alternatives needs, so find proper path from its output - RUBOCOP_PATH=$(update-alternatives --display rubocop | sed "/^[^[:space:]]\+$1"'/!d;s/^\([^[:space:]]\+\).*$/\1/') + RUBOCOP_PATH=$(update-alternatives --display rubocop 2> /dev/null | sed "/^[^[:space:]]\+$1"'/!d;s/^\([^[:space:]]\+\).*$/\1/' || true) if [ -n "$RUBOCOP_PATH" ]; then update-alternatives --set rubocop "$RUBOCOP_PATH" else - RUBOCOP_PATH=$(alts -l rubocop | grep "Target:" | sed "s/^.*Target:\s*\(\S.*\)$/\1/" | grep "$1") + RUBOCOP_PATH=$(alts -l rubocop | grep "Target:" | sed "s/^.*Target:\s*\(\S.*\)$/\1/" | grep "$1" || true) if [ -n "$RUBOCOP_PATH" ]; then alts -s -n rubocop "$RUBOCOP_PATH" else