Skip to content

Commit

Permalink
Clarify that fatal error is fine (#1335)
Browse files Browse the repository at this point in the history
  • Loading branch information
goretkin authored Jun 13, 2020
1 parent 9ccdef2 commit 2a246ad
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Documenter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -554,8 +554,13 @@ function git_push(
try
run(`git checkout -b $branch upstream/$branch`)
catch e
@info """
Checking out $branch failed, creating a new orphaned branch.
This usually happens when deploying to a repository for the first time and
the $branch branch does not exist yet. The fatal error above is expected output
from Git in this situation.
"""
@debug "checking out $branch failed with error: $e"
@debug "creating a new local $branch branch."
run(`git checkout --orphan $branch`)
run(`git commit --allow-empty -m "Initial empty commit for docs"`)
end
Expand Down

0 comments on commit 2a246ad

Please sign in to comment.