mirror of
https://github.com/oven-sh/bun
synced 2026-02-15 21:32:05 +00:00
change how bunx caches things (#8921)
* some things * yeah * ok * fix compilation error * fix on windows * ok * username
This commit is contained in:
@@ -1827,11 +1827,11 @@ pub fn assertIsValidWindowsPath(comptime T: type, path: []const T) void {
|
||||
if (bun.path.Platform.windows.isAbsoluteT(T, path) and
|
||||
isWindowsAbsolutePathMissingDriveLetter(T, path))
|
||||
{
|
||||
std.debug.panic("Do not pass posix paths to windows APIs, was given '{s}' (missing a root like 'C:\\', see PosixToWinNormalizer for why this is an assertion)", .{
|
||||
std.debug.panic("Internal Error: Do not pass posix paths to Windows APIs, was given '{s}'" ++ if (Environment.isDebug) " (missing a root like 'C:\\', see PosixToWinNormalizer for why this is an assertion)" else ". Please open an issue on GitHub with a reproduction.", .{
|
||||
if (T == u8) path else std.unicode.fmtUtf16le(path),
|
||||
});
|
||||
}
|
||||
if (hasPrefixComptimeType(T, path, ":/")) {
|
||||
if (hasPrefixComptimeType(T, path, ":/") and Environment.isDebug) {
|
||||
std.debug.panic("Path passed to windows API '{s}' is almost certainly invalid. Where did the drive letter go?", .{
|
||||
if (T == u8) path else std.unicode.fmtUtf16le(path),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user