mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
Make kube::util::ensure_clean_working_dir more verbose in log files
This commit is contained in:
parent
1d633b7fdd
commit
f763fdc3c1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user