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:
Jessica Frazelle
2015-02-19 13:18:20 -08:00
parent 2e1876988b
commit dd3dafec23
3 changed files with 14 additions and 10 deletions
+2 -2
View File
@@ -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:"