From 40cb8aa6f9a7e50111e02b0f7c9541063788a5f0 Mon Sep 17 00:00:00 2001 From: borjaperfra Date: Mon, 14 Sep 2026 12:22:17 +0200 Subject: [PATCH] fix: point both installers at v0.1.6 v0.1.5 answered "unsupported architecture" on an ordinary x64 machine. It asked RuntimeInformation.OSArchitecture and believed the silence, and reaching for an arbitrary .NET type is what ConstrainedLanguage mode blocks - the normal state under an AppLocker or WDAC policy - while the type does not exist at all before .NET Framework 4.7.1. It reads PROCESSOR_ARCHITEW6432 and PROCESSOR_ARCHITECTURE as well now. Fixed in helmcode/nan-cli#7. Co-Authored-By: Claude Opus 5 (1M context) --- src/pages/install.ps1.ts | 8 +++++++- src/pages/install.ts | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/pages/install.ps1.ts b/src/pages/install.ps1.ts index 97e2641..b1f21d4 100644 --- a/src/pages/install.ps1.ts +++ b/src/pages/install.ps1.ts @@ -37,12 +37,18 @@ export const prerender = false; * took the error message with it. Reported from Warp, reproduced, and fixed in * helmcode/nan-cli#6, where the body became a function that throws. * + * v0.1.6 fixes the third one: the script asked RuntimeInformation for the + * architecture and believed the silence, so on a machine where that .NET type + * is out of reach - ConstrainedLanguage mode under an AppLocker or WDAC policy, + * or anything before .NET Framework 4.7.1 - an ordinary x64 box was told it was + * an unsupported architecture. It reads the environment as well now. + * * If this tag ever stops existing, the upstream fetch 404s and the route * answers with the error script below - the correct degraded behaviour for * something piped into `iex`. */ const SCRIPT_URL = - 'https://raw.githubusercontent.com/helmcode/nan-cli/v0.1.5/scripts/install.ps1'; + 'https://raw.githubusercontent.com/helmcode/nan-cli/v0.1.6/scripts/install.ps1'; export const GET: APIRoute = async () => { let upstream: Response; diff --git a/src/pages/install.ts b/src/pages/install.ts index 0926b72..cd4afef 100644 --- a/src/pages/install.ts +++ b/src/pages/install.ts @@ -42,7 +42,7 @@ export const prerender = false; * it, which explains neither what happened nor what to do. */ const SCRIPT_URL = - 'https://raw.githubusercontent.com/helmcode/nan-cli/v0.1.5/scripts/install.sh'; + 'https://raw.githubusercontent.com/helmcode/nan-cli/v0.1.6/scripts/install.sh'; export const GET: APIRoute = async () => { let upstream: Response;