Skip to content

Commit 04b96b2

Browse files
catch if the active project is erroneously set to a manifest file (#3894)
* catch if active project is set to a manifest file * Update src/Types.jl
1 parent bcd3e76 commit 04b96b2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Types.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,12 @@ function find_project_file(env::Union{Nothing,String}=nothing)
217217
abspath(env, Base.project_names[end])
218218
end
219219
end
220+
if isfile(project_file) && !contains(basename(project_file), "Project")
221+
pkgerror("""
222+
The active project has been set to a file that isn't a Project file: $project_file
223+
The project path must be to a Project file or directory.
224+
""")
225+
end
220226
@assert project_file isa String &&
221227
(isfile(project_file) || !ispath(project_file) ||
222228
isdir(project_file) && isempty(readdir(project_file)))

0 commit comments

Comments
 (0)