merge-after-ci: don't format untracked files
This commit is contained in:
@@ -43,7 +43,17 @@ else
|
|||||||
:
|
:
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
if ! treefmt --fail-on-change --no-cache; then
|
mapfile -t untracked < <(git ls-files --others --exclude-standard)
|
||||||
|
if [[ ${#untracked[@]} -gt 0 ]]; then
|
||||||
|
for item in "${untracked[@]}"; do
|
||||||
|
exclude_args+=("--excludes" "$item")
|
||||||
|
done
|
||||||
|
treefmt=(treefmt "${exclude_args[@]}")
|
||||||
|
else
|
||||||
|
treefmt=(treefmt)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! "${treefmt[@]}" --fail-on-change --no-cache; then
|
||||||
pop
|
pop
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user