Skip to content

Commit f3ed020

Browse files
authored
don't assume gh-pages branch exists locally in publish-book Makefile target (#7977)
1 parent e445b15 commit f3ed020

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ publish-book: | book auditors-book
783783
echo -e "\nWarning: you're publishing the books from a branch that is neither 'stable' nor 'unstable'!\n"; \
784784
fi
785785
CURRENT_COMMIT="$$(git rev-parse --short HEAD)" && \
786-
git branch -D gh-pages && \
786+
{ git branch -D gh-pages || true; } && \
787787
git branch --track gh-pages origin/gh-pages && \
788788
git worktree add tmp-book gh-pages && \
789789
rm -rf tmp-book/* && \

0 commit comments

Comments
 (0)