| author | |
| committer | |
| log | 5e7c44a3211dc8b1bb0b6d3d4764f8fd0b8c665b |
| tree | 17c5ba50c1c6680842bd8e7526548b144566abe5 |
| parent | 6d84caf72771cf05997518ae2fa40a94de709de4 |
2 files changed, 4 insertions(+), 3 deletions(-)
src/Package/Fetch.zig+3-1| ... | ... | @@ -257,7 +257,9 @@ pub fn run(f: *Fetch) RunError!void { |
| 257 | 257 | f.hash_tok, |
| 258 | 258 | try eb.addString("path-based dependencies are not hashed"), |
| 259 | 259 | ); |
| 260 | if (std.mem.startsWith(u8, pkg_root.sub_path, "../")) { | |
| 260 | if (std.mem.startsWith(u8, pkg_root.sub_path, "../") or | |
| 261 | std.mem.eql(u8, pkg_root.sub_path, "..")) | |
| 262 | { | |
| 261 | 263 | return f.fail( |
| 262 | 264 | f.location_tok, |
| 263 | 265 | try eb.printString("dependency path outside project: '{}{s}'", .{ |
src/Package/Manifest.zig+1-2| ... | ... | @@ -318,8 +318,7 @@ const Parse = struct { |
| 318 | 318 | |
| 319 | 319 | for (array_init.ast.elements) |elem_node| { |
| 320 | 320 | const path_string = try parseString(p, elem_node); |
| 321 | const normalized = try std.fs.path.resolve(p.arena, &.{path_string}); | |
| 322 | try p.paths.put(p.gpa, normalized, {}); | |
| 321 | try p.paths.put(p.gpa, path_string, {}); | |
| 323 | 322 | } |
| 324 | 323 | } |
| 325 | 324 |