mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 07:36:27 -04:00
Allow running check_script.sh when there are uncommitted changes
This commit is contained in:
parent
df171722cb
commit
fcce4de6fc
|
|
@ -5,15 +5,13 @@
|
|||
|
||||
set -e
|
||||
|
||||
git diff --quiet || {
|
||||
echo "Error: there are unstaged changes. Please stage or stash them before running this script."
|
||||
exit 1
|
||||
}
|
||||
|
||||
just test
|
||||
just lint
|
||||
|
||||
status_before_generate=$(git status --porcelain=v1)
|
||||
just generate
|
||||
git diff --quiet || {
|
||||
status_after_generate=$(git status --porcelain=v1)
|
||||
if [[ "$status_after_generate" != "$status_before_generate" ]]; then
|
||||
echo "Error: auto-generated files not up to date."
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue