mirror of
https://github.com/docker/cli.git
synced 2026-09-24 23:41:10 -05:00
fix tomlv because it doesn't read from stdin
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle) Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <jess@docker.com> (github: jfrazelle) Upstream-commit: 06685a53c16468a5fd3dfcc247a7a8dd5aaf85c1 Component: engine
This commit is contained in:
@@ -9,13 +9,13 @@ unset IFS
|
||||
badFiles=()
|
||||
for f in "${files[@]}"; do
|
||||
# we use "git show" here to validate that what's committed is formatted
|
||||
if [ "$(git show "$VALIDATE_HEAD:$f" | tomlv)" ]; then
|
||||
if ! git show "$VALIDATE_HEAD:$f" | tomlv /proc/self/fd/0 ; then
|
||||
badFiles+=( "$f" )
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ${#badFiles[@]} -eq 0 ]; then
|
||||
echo 'Congratulations! All toml source files have valid syntax.'
|
||||
echo 'Congratulations! All toml source files changed here have valid syntax.'
|
||||
else
|
||||
{
|
||||
echo "These files are not valid toml:"
|
||||
|
||||
Reference in New Issue
Block a user