mirror of
https://github.com/ziglang/zig.git
synced 2026-01-13 10:55:11 +00:00
Package.Fetch: allow relative paths outside project root
Only for packages that come from the main package. Fetched packages still cannot depend on paths outside their package root.
This commit is contained in:
parent
b2c36b14de
commit
fa08e49f83
@ -257,8 +257,9 @@ pub fn run(f: *Fetch) RunError!void {
|
||||
f.hash_tok,
|
||||
try eb.addString("path-based dependencies are not hashed"),
|
||||
);
|
||||
if (std.mem.startsWith(u8, pkg_root.sub_path, "../") or
|
||||
std.mem.eql(u8, pkg_root.sub_path, ".."))
|
||||
if ((std.mem.startsWith(u8, pkg_root.sub_path, "../") or
|
||||
std.mem.eql(u8, pkg_root.sub_path, "..")) and
|
||||
pkg_root.root_dir.eql(cache_root))
|
||||
{
|
||||
return f.fail(
|
||||
f.location_tok,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user