Skip to content

Commit

Permalink
catch if the active project is erroneously set to a manifest file (#3894
Browse files Browse the repository at this point in the history
)

* catch if active project is set to a manifest file

* Update src/Types.jl
  • Loading branch information
IanButterworth authored Jul 4, 2024
1 parent bcd3e76 commit 04b96b2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,12 @@ function find_project_file(env::Union{Nothing,String}=nothing)
abspath(env, Base.project_names[end])
end
end
if isfile(project_file) && !contains(basename(project_file), "Project")
pkgerror("""
The active project has been set to a file that isn't a Project file: $project_file
The project path must be to a Project file or directory.
""")
end
@assert project_file isa String &&
(isfile(project_file) || !ispath(project_file) ||
isdir(project_file) && isempty(readdir(project_file)))
Expand Down

0 comments on commit 04b96b2

Please sign in to comment.