Skip to content
This repository was archived by the owner on Aug 16, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/Products.jl
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,14 @@ function write_deps_file(depsjl_path::AbstractString, products::Vector{P};
escape_path = path -> replace(path, "\\" => "\\\\")

# Grab the package name as the name of the top-level directory of a package
package_name = basename(dirname(dirname(depsjl_path)))

# Auto-detect being placed within the `~/.julia/packages/XXXXX` directory
if basename(dirname(dirname(dirname(dirname(depsjl_path))))) == "packages"
package_name = basename(dirname(dirname(dirname(depsjl_path))))
else
# otherwise assume same as folder name
# TODO: check Project.toml
package_name = basename(dirname(dirname(depsjl_path)))
end
# We say this a couple of times
rebuild = strip("""
Please re-run Pkg.build(\\\"$(package_name)\\\"), and restart Julia.
Expand Down