mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
fix: get bun build working on window (#8712)
* work on bundler * a * YAAAAYYAYAYAYYAYA * get some more bundler tests working * Update src/bundler/bundle_v2.zig * rev * ok * i converted the cmakelists into LF * personal review * we didnt win * okey they pass * revert :( * a --------- Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
This commit is contained in:
@@ -735,7 +735,7 @@ pub fn withoutTrailingSlashWindowsPath(this: string) []const u8 {
|
||||
}
|
||||
|
||||
pub fn withTrailingSlash(dir: string, in: string) []const u8 {
|
||||
if (comptime Environment.allow_assert) std.debug.assert(bun.isSliceInBuffer(dir, in));
|
||||
if (comptime Environment.allow_assert) std.debug.assert(bun.isSliceInBuffer(u8, dir, in));
|
||||
return in[0..@min(strings.withoutTrailingSlash(in[0..@min(dir.len + 1, in.len)]).len + 1, in.len)];
|
||||
}
|
||||
|
||||
@@ -869,10 +869,6 @@ pub fn hasPrefixComptime(self: string, comptime alt: anytype) bool {
|
||||
return self.len >= alt.len and eqlComptimeCheckLenWithType(u8, self[0..alt.len], alt, false);
|
||||
}
|
||||
|
||||
pub fn isBunStandaloneFilePath(self: string) bool {
|
||||
return hasPrefixComptime(self, "/$bunfs/");
|
||||
}
|
||||
|
||||
pub fn hasPrefixComptimeUTF16(self: []const u16, comptime alt: []const u8) bool {
|
||||
return self.len >= alt.len and eqlComptimeCheckLenWithType(u16, self[0..alt.len], comptime toUTF16Literal(alt), false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user