Simplify and sanitize plugin line parsing
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
This commit is contained in:
+2
-3
@@ -212,10 +212,9 @@ runs:
|
|||||||
env:
|
env:
|
||||||
PLUGINS: ${{ inputs.plugins }}
|
PLUGINS: ${{ inputs.plugins }}
|
||||||
run: |
|
run: |
|
||||||
# Read line by line
|
|
||||||
echo "$PLUGINS" | while read -r PLUGIN; do
|
echo "$PLUGINS" | while read -r PLUGIN; do
|
||||||
# if $PLUGIN contains some string value and is not empty
|
trimmed="${PLUGIN//[[:space:]]/}"
|
||||||
if [[ -n $PLUGIN ]] || [[ $PLUGIN ]]; then
|
if [[ -n "$trimmed" ]]; then
|
||||||
echo Installing: "$PLUGIN"
|
echo Installing: "$PLUGIN"
|
||||||
flux plugin install "$PLUGIN"
|
flux plugin install "$PLUGIN"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user