Skip to content

Commit 7c97a86

Browse files
authored
Fix precompilation when package is not a dev dependency (#2174)
1 parent bf0d270 commit 7c97a86

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

src/docs_precompile/make.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ makedocs(
66
pages = Any[
77
"Home" => "index.md",
88
],
9-
build = mktempdir()
9+
build = mktempdir(),
10+
remotes = nothing,
1011
)
1112
end

src/documents.jl

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ function Document(plugins = nothing;
369369
remote, remotes = if isnothing(remotes)
370370
if isa(repo, AbstractString) && !isempty(repo)
371371
err = """
372-
When `remotes` is set to `nothing`, `repo` must be unset.
372+
When `remotes` is set to `nothing`, `repo` must not be set.
373373
"""
374374
throw(ArgumentError(err))
375375
end
@@ -581,19 +581,23 @@ function interpret_repo_and_remotes(; root, repo, remotes)
581581
makedocs_root_remote = repo_normalized
582582
elseif isnothing(makedocs_root_remote)
583583
err = """
584-
Unable to automatically determine remote for main repo -- `repo` is not set, and the Git repository has invalid origin.
585-
path: $(makedocs_root_repo)
586-
"""
584+
Unable to automatically determine remote for main repo.
585+
> `repo` is not set, and the Git repository has invalid origin.
586+
Configure `repo` and/or `remotes` appropriately, or set `remotes = nothing` to disable remote source
587+
links altogether (e.g. if not working in a Git repository).
588+
path: $(makedocs_root_repo)"""
587589
throw(ArgumentError(err))
588590
end
589591
# Since this path was not in remotes, we also need to add it there.
590592
addremote!(remotes_checked, RemoteRepository(makedocs_root_repo, makedocs_root_remote))
591593
else
592594
# Finally, if we're neither in a git repo, and nothing is in remotes,
593595
err = """
594-
Unable to automatically determine remote for main repo: `repo` is not set, and makedocs is not in a Git repository.
595-
path: $(makedocs_root_repo)
596-
"""
596+
Unable to automatically determine remote for main repo.
597+
> `repo` is not set, and makedocs is not in a Git repository.
598+
Configure `repo` and/or `remotes` appropriately, or set `remotes = nothing` to disable remote source
599+
links altogether (e.g. if not working in a Git repository).
600+
path: $(makedocs_root_repo)"""
597601
throw(ArgumentError(err))
598602
end
599603

0 commit comments

Comments
 (0)