Commit ba110e9f authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #50670 from sttts/sttts-verbose-unclean-diff

Automatic merge from submit-queue Make kube::util::ensure_clean_working_dir more verbose in log files Makes it easier to understand why files seem to be changed during CI build, especially autogenerated files like conversions.
parents 1d633b7f f763fdc3
......@@ -484,10 +484,12 @@ kube::util::godep_restored() {
kube::util::ensure_clean_working_dir() {
while ! git diff HEAD --exit-code &>/dev/null; do
echo -e "\nUnexpected dirty working directory:\n"
git status -s | sed 's/^/ /'
if ! tty -s; then
if tty -s; then
git status -s
else
git diff -a # be more verbose in log files without tty
exit 1
fi
fi | sed 's/^/ /'
echo -e "\nCommit your changes in another terminal and then continue here by pressing enter."
read
done 1>&2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment