mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
std/build: assert that install paths are relative
If absolute paths are passed they will work unless $DESTDIR is set, which causes subtly broken build.zig's.
This commit is contained in:
parent
3dafc5b9a3
commit
d3ecbbebd3
@ -1100,6 +1100,7 @@ pub const Builder = struct {
|
||||
}
|
||||
|
||||
pub fn getInstallPath(self: *Builder, dir: InstallDir, dest_rel_path: []const u8) []const u8 {
|
||||
assert(!fs.path.isAbsolute(dest_rel_path)); // Install paths must be relative to the prefix
|
||||
const base_dir = switch (dir) {
|
||||
.Prefix => self.install_path,
|
||||
.Bin => self.exe_dir,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user