mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-26 09:16:07 +02:00
GitHub bot: fix linting issues (nobuild)
This commit is contained in:
@@ -145,20 +145,20 @@ while IFS= read -r line; do
|
|||||||
|
|
||||||
# Check if secret
|
# Check if secret
|
||||||
if [[ "$line" == *!secret* ]]; then
|
if [[ "$line" == *!secret* ]]; then
|
||||||
echo "Secret detected"
|
echo "Secret detected"
|
||||||
if [ ! -f "$SECRETSFILE" ]; then
|
if [ ! -f "$SECRETSFILE" ]; then
|
||||||
bashio::log.fatal "Secrets file not found in $SECRETSFILE, $line skipped"
|
bashio::log.fatal "Secrets file not found in $SECRETSFILE, $line skipped"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
secret=$(echo "$line" | sed 's/.*!secret \(.*\)/\1/')
|
secret=$(echo "$line" | sed 's/.*!secret \(.*\)/\1/')
|
||||||
# Check if single match
|
# Check if single match
|
||||||
secretnum=$(sed -n "/$secret:/=" "$SECRETSFILE")
|
secretnum=$(sed -n "/$secret:/=" "$SECRETSFILE")
|
||||||
if [[ $(echo "$secretnum" | grep -q ' ') ]]; then
|
if [[ $(echo "$secretnum" | grep -q ' ') ]]; then
|
||||||
bashio::exit.nok "There are multiple matches for your password name. Please check your secrets.yaml file"
|
bashio::exit.nok "There are multiple matches for your password name. Please check your secrets.yaml file"
|
||||||
fi
|
fi
|
||||||
# Get text
|
# Get text
|
||||||
secret_value=$(sed -n "/$secret:/s/.*: //p" "$SECRETSFILE")
|
secret_value=$(sed -n "/$secret:/s/.*: //p" "$SECRETSFILE")
|
||||||
line="${line%%=*}='$secret_value'"
|
line="${line%%=*}='$secret_value'"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Data validation
|
# Data validation
|
||||||
|
|||||||
Reference in New Issue
Block a user