fix(natives/scripts): fixed Linux host Zig target detection when report header is absent
- Stored the process report in a local variable before reading the header for host detection. - Updated the type assertion so the header path is optional and guarded. - Kept the Linux zig target selection logic unchanged while fixing the runtime check.
This commit is contained in:
@@ -88,8 +88,8 @@ const effectiveVariant = resolveEffectiveVariant();
|
||||
const variantSuffix = effectiveVariant ? `-${effectiveVariant}` : "";
|
||||
|
||||
function resolveLinuxHostZigTarget(): "x86_64-linux-gnu" | "x86_64-linux-musl" {
|
||||
const header = process.report?.getReport?.().header as { glibcVersionRuntime?: string } | undefined;
|
||||
return header?.glibcVersionRuntime ? "x86_64-linux-gnu" : "x86_64-linux-musl";
|
||||
const report = process.report?.getReport?.() as { header?: { glibcVersionRuntime?: string } } | undefined;
|
||||
return report?.header?.glibcVersionRuntime ? "x86_64-linux-gnu" : "x86_64-linux-musl";
|
||||
}
|
||||
|
||||
function resolveSafeHostZigBuildConfig(): SafeHostZigBuildConfig | null {
|
||||
|
||||
Reference in New Issue
Block a user