Skip to content
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.

Commit

Permalink
fix: newlines in rpm-ostree cmds errors
Browse files Browse the repository at this point in the history
i'm not sure if this approach is better than iterating over the array
but it should now work in the same way it did previously
  • Loading branch information
xynydev committed Aug 26, 2023
1 parent c2367e0 commit e27eb25
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions modules/rpm-ostree/rpm-ostree.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ fi
get_yaml_array INSTALL '.install[]' "$1"
if [[ ${#INSTALL[@]} -gt 0 ]]; then
echo "Installing RPMs"
echo "Installing: ${INSTALL[*]}"
rpm-ostree install "${INSTALL[@]}"
INSTALL_STR=$(echo "${INSTALL[*]}" | tr -d '\n')
echo "Installing: $INSTALL_STR"
rpm-ostree install "$INSTALL_STR"
fi

get_yaml_array REMOVE '.remove[]' "$1"
if [[ ${#REMOVE[@]} -gt 0 ]]; then
echo "Removing RPMs"
echo "Removing: ${REMOVE[*]}"
rpm-ostree override remove "${REMOVE[@]}"
REMOVE_STR=$(echo "${REMOVE[*]}" | tr -d '\n')
echo "Removing: $REMOVE"
rpm-ostree override remove "$REMOVE_STR"
fi

0 comments on commit e27eb25

Please sign in to comment.