fix Kind/Breaking tag

This commit is contained in:
Merith 2024-09-27 10:46:35 -07:00
parent 42078da550
commit 95fb2cafff

View file

@ -4,7 +4,7 @@ set -e
# Technically not nessecary but it cleans up the logs from having token/secret values # Technically not nessecary but it cleans up the logs from having token/secret values
run_command() { run_command() {
local cmd="$1" local cmd="$@"
# Replace any --token <value> or --secret <value> with [REDACTED] # Replace any --token <value> or --secret <value> with [REDACTED]
local safe_cmd=$(echo "$cmd" | sed -E 's/--(token|secret) [^ ]+/--\1 [REDACTED]/g') local safe_cmd=$(echo "$cmd" | sed -E 's/--(token|secret) [^ ]+/--\1 [REDACTED]/g')
decho "Running command: $safe_cmd" decho "Running command: $safe_cmd"
@ -23,6 +23,12 @@ if [[ $(id -u) -eq 0 ]]; then
decho "[WARNING] Running as root user" decho "[WARNING] Running as root user"
fi fi
# Handle if `command` is passed, as command appends arguments to the entrypoint
if [ "$#" -gt 0 ]; then
run_command "$@"
exit
fi
# Handle and alter the config file # Handle and alter the config file
if [[ -z "${CONFIG_FILE}" ]]; then if [[ -z "${CONFIG_FILE}" ]]; then
echo "CONFIG_FILE is not set" echo "CONFIG_FILE is not set"