diff --git a/src/dev_tools_hooks/hooks/pre-commit b/src/dev_tools_hooks/hooks/pre-commit index 51b68ac..eab6902 100644 --- a/src/dev_tools_hooks/hooks/pre-commit +++ b/src/dev_tools_hooks/hooks/pre-commit @@ -47,6 +47,7 @@ yaml_get() { in_section && /^[a-zA-Z]/ { in_section=0 } in_section && $0 ~ "^ "child":" { gsub(/^ [a-zA-Z_-]+:[ ]*/, "") + gsub(/^[ \t]+|[ \t]+$/, "") gsub(/^["'\'']|["'\'']$/, "") gsub(/^[ \t]+|[ \t]+$/, "") print @@ -57,6 +58,7 @@ yaml_get() { awk -v key="$key" ' $0 ~ "^"key":" { gsub(/^[a-zA-Z_-]+:[ ]*/, "") + gsub(/^[ \t]+|[ \t]+$/, "") gsub(/^["'\'']|["'\'']$/, "") gsub(/^[ \t]+|[ \t]+$/, "") print @@ -255,7 +257,7 @@ run_commands() { cd "$PROJECT_ROOT" || exit 1 - if eval "$full_cmd"; then + if eval "$full_cmd"