aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--justfile10
1 files changed, 7 insertions, 3 deletions
diff --git a/justfile b/justfile
index a6f078d..c2177f4 100644
--- a/justfile
+++ b/justfile
@@ -14,9 +14,13 @@ update-nur-packages:
sync HOST=default_host:
git fetch --all
- git stash save
- git switch -d origin/main
- git stash pop
+ if git diff --quiet; then \
+ git stash save; \
+ git switch -d origin/main; \
+ git stash pop; \
+ else \
+ git switch -d origin/main; \
+ fi
just switch "{{HOST}}"
switch HOST=default_host: