mirror of
https://github.com/fluxcd/flux2.git
synced 2026-07-02 11:55:08 +00:00
Simplify and sanitize plugin line parsing
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
This commit is contained in:
parent
8daa9b9ddf
commit
72c2a83e4f
1 changed files with 2 additions and 3 deletions
|
|
@ -212,10 +212,9 @@ runs:
|
|||
env:
|
||||
PLUGINS: ${{ inputs.plugins }}
|
||||
run: |
|
||||
# Read line by line
|
||||
echo "$PLUGINS" | while read -r PLUGIN; do
|
||||
# if $PLUGIN contains some string value and is not empty
|
||||
if [[ -n $PLUGIN ]] || [[ $PLUGIN ]]; then
|
||||
trimmed="${PLUGIN//[[:space:]]/}"
|
||||
if [[ -n "$trimmed" ]]; then
|
||||
echo Installing: "$PLUGIN"
|
||||
flux plugin install "$PLUGIN"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue