Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.
TypeScript ai-agentsbill-of-materialserpinventory-managementleanmanufacturingmanufacturing-execution-systemmcp-servermesmrpopen-source-erppostgresqlproduction-planningqmsquality-management-systemreact-routerself-hostedsupabasetraceabilitytypescript
fix: windows shell
Sidwebworks4f5442653582
diff --git a/packages/dev/package.json b/packages/dev/package.jsonindex 85f52fc750..db9b3ec699 100644--- a/packages/dev/package.json+++ b/packages/dev/package.json@@ -8,7 +8,10 @@},"scripts": {"clean": "rimraf node_modules .turbo",- "lint": "biome lint --write"+ "lint": "biome lint --write",+ "test": "vitest run",+ "test:watch": "vitest",+ "typecheck": "tsgo --noEmit"},"dependencies": {"@bomb.sh/tab": "^0.0.15",@@ -25,6 +28,7 @@"@types/node": "20.19.39","rimraf": "5.0.10","tsx": "4.21.0",- "typescript": "5.8.3"+ "typescript": "5.8.3",+ "vitest": "catalog:"}}diff --git a/packages/dev/src/services/portless.test.ts b/packages/dev/src/services/portless.test.tsnew file mode 100644index 0000000000..9be5499e1e--- /dev/null+++ b/packages/dev/src/services/portless.test.ts@@ -0,0 +1,25 @@+import { describe, expect, it } from "vitest";+import { portlessPrivilegedCmd } from "./portless.js";++describe("portlessPrivilegedCmd", () => {+ it("runs portless directly on Windows (no sudo binary)", () => {+ expect(+ portlessPrivilegedCmd(["proxy", "start"], {+ platform: "win32",+ home: "C:\\Users\\someone"+ })+ ).toEqual({ file: "portless", args: ["proxy", "start"] });+ });++ it("wraps in sudo with HOME=... on POSIX shells", () => {+ expect(+ portlessPrivilegedCmd(["proxy", "start"], {+ platform: "linux",+ home: "/home/someone"+ })+ ).toEqual({+ file: "sudo",+ args: ["HOME=/home/someone", "portless", "proxy", "start"]+ });+ });+});diff --git a/packages/dev/src/services/portless.ts b/packages/dev/src/services/portless.tsindex fa6f6a6034..5f5e02a459 100644--- a/packages/dev/src/services/portless.ts+++ b/packages/dev/src/services/portless.ts@@ -23,6 +23,29 @@ function portlessEnv(): NodeJS.ProcessEnv {return out;}+type SudoArgsOptions = {+ platform?: NodeJS.Platform;+ home?: string;+};++// Builds the privileged command for a portless invocation. On POSIX we+// shell out to `sudo` (preserving HOME so portless state lands in the+// user's ~/.portless rather than /var/root/.portless). On Windows there+// is no `sudo` binary — the terminal itself must be elevated — so we+// run `portless` directly. If the user isn't elevated, portless will+// surface its own UAC / permission error, which is the right signal.+export function portlessPrivilegedCmd(+ args: string[],+ options: SudoArgsOptions = {}+): { file: string; args: string[] } {+ const platform = options.platform ?? process.platform;+ if (platform === "win32") {+ return { file: "portless", args };+ }+ const home = options.home ?? homedir();+ return { file: "sudo", args: [`HOME=${home}`, "portless", ...args] };+}+export async function ensurePortlessInstalled() {const installed = await detectPortlessVersion();if (installed && cmpSemver(installed, PORTLESS_MIN_VERSION) >= 0) return;@@ -172,46 +195,57 @@ export async function ensureProxyPrivileges() {].join("\n"));+ const isWin = process.platform === "win32";const proceed = await confirm({- message:- "Set it up now? Will run sudo to bind :443, install the local CA, and write /etc/hosts entries.",+ message: isWin+ ? "Set it up now? Will run portless to bind :443, install the local CA, and write the hosts file. Terminal must be elevated (Run as Administrator)."+ : "Set it up now? Will run sudo to bind :443, install the local CA, and write /etc/hosts entries.",initialValue: true});if (isCancel(proceed) || !proceed) {throw new Error(- "Aborted. Run manually: `sudo portless proxy stop && sudo portless proxy start --tld dev && sudo portless trust`. Then re-run `crbn up`."+ isWin+ ? "Aborted. From an elevated terminal run: `portless proxy stop && portless proxy start --tld dev && portless trust`. Then re-run `crbn up`."+ : "Aborted. Run manually: `sudo portless proxy stop && sudo portless proxy start --tld dev && sudo portless trust`. Then re-run `crbn up`.");}- log.info("running sudo commands — you'll be prompted for your password");-- // Preserve user HOME — sudo resets to root's HOME otherwise, sending- // portless state (~/.portless) into /var/root/.portless.- const sudoEnvArg = `HOME=${homedir()}`;+ if (process.platform === "win32") {+ log.info(+ "running portless commands — terminal must be elevated (Run as Administrator)"+ );+ } else {+ log.info("running sudo commands — you'll be prompted for your password");+ }- await execa("sudo", [sudoEnvArg, "portless", "proxy", "stop"], {+ const stopCmd = portlessPrivilegedCmd(["proxy", "stop"]);+ await execa(stopCmd.file, stopCmd.args, {stdio: "inherit",reject: false});- const start = await execa(- "sudo",- [sudoEnvArg, "portless", "proxy", "start", "--tld", PORTLESS_TLD],- { stdio: "inherit", reject: false }- );+ const startCmd = portlessPrivilegedCmd([+ "proxy",+ "start",+ "--tld",+ PORTLESS_TLD+ ]);+ const start = await execa(startCmd.file, startCmd.args, {+ stdio: "inherit",+ reject: false+ });if (start.exitCode !== 0) {- throw new Error(- `sudo portless proxy start failed (exit ${start.exitCode})`- );+ throw new Error(`portless proxy start failed (exit ${start.exitCode})`);}- const trust = await execa("sudo", [sudoEnvArg, "portless", "trust"], {+ const trustCmd = portlessPrivilegedCmd(["trust"]);+ const trust = await execa(trustCmd.file, trustCmd.args, {stdio: "inherit",reject: false});if (trust.exitCode !== 0) {log.warn(- `sudo portless trust failed (exit ${trust.exitCode}); browsers may show cert warnings until you run it manually.`+ `portless trust failed (exit ${trust.exitCode}); browsers may show cert warnings until you run it manually.`);}@@ -227,11 +261,11 @@ export async function ensureProxyPrivileges() {// Push registered routes into /etc/hosts. Needs sudo; idempotent.export async function syncHostsFile() {- const r = await execa(- "sudo",- [`HOME=${homedir()}`, "portless", "hosts", "sync"],- { stdio: "inherit", reject: false }- );+ const hostsCmd = portlessPrivilegedCmd(["hosts", "sync"]);+ const r = await execa(hostsCmd.file, hostsCmd.args, {+ stdio: "inherit",+ reject: false+ });if (r.exitCode !== 0) {throw new Error(`sudo portless hosts sync failed (exit ${r.exitCode}). Run it manually to fix DNS.`diff --git a/packages/locale/locales/de/erp.po b/packages/locale/locales/de/erp.poindex 85101581de..2fa11b3f8e 100644--- a/packages/locale/locales/de/erp.po+++ b/packages/locale/locales/de/erp.po@@ -4607,7 +4607,7 @@ msgstr "Mitarbeitertyp bearbeiten"msgid "Edit expiration date"msgstr "Ablaufdatum bearbeiten"-#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:242+#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:245msgid "Edit Expiry"msgstr "Ablaufdatum bearbeiten"@@ -13859,7 +13859,7 @@ msgstr "Verfolgen Sie jede Änderung an Ihren Bestellungen, Rechnungen, Kunden,msgid "Track when batches or serials of this item expire."msgstr "Verfolgen Sie, wann Chargen oder Seriennummern dieses Artikels ablaufen."-#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:257+#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:260#: apps/erp/app/modules/inventory/ui/useInventorySubmodules.tsx:71#: apps/erp/app/routes/x+/inventory+/tracked-entities.tsx:16#: apps/erp/app/routes/x+/issue+/$id.tsx:147diff --git a/packages/locale/locales/en/erp.po b/packages/locale/locales/en/erp.poindex 141af554c4..c51c0ceed1 100644--- a/packages/locale/locales/en/erp.po+++ b/packages/locale/locales/en/erp.po@@ -4607,7 +4607,7 @@ msgstr "Edit Employee Type"msgid "Edit expiration date"msgstr "Edit expiration date"-#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:242+#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:245msgid "Edit Expiry"msgstr "Edit Expiry"@@ -13859,7 +13859,7 @@ msgstr "Track every change to your orders, invoices, customers, suppliers, and mmsgid "Track when batches or serials of this item expire."msgstr "Track when batches or serials of this item expire."-#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:257+#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:260#: apps/erp/app/modules/inventory/ui/useInventorySubmodules.tsx:71#: apps/erp/app/routes/x+/inventory+/tracked-entities.tsx:16#: apps/erp/app/routes/x+/issue+/$id.tsx:147diff --git a/packages/locale/locales/es/erp.po b/packages/locale/locales/es/erp.poindex 09c5cf5cda..e1096f011b 100644--- a/packages/locale/locales/es/erp.po+++ b/packages/locale/locales/es/erp.po@@ -4607,7 +4607,7 @@ msgstr "Editar Tipo de Empleado"msgid "Edit expiration date"msgstr "Editar fecha de vencimiento"-#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:242+#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:245msgid "Edit Expiry"msgstr "Editar Vencimiento"@@ -13859,7 +13859,7 @@ msgstr "Realiza un seguimiento de cada cambio en tus pedidos, facturas, clientesmsgid "Track when batches or serials of this item expire."msgstr "Realiza un seguimiento de cuándo vencen los lotes o números de serie de este artículo."-#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:257+#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:260#: apps/erp/app/modules/inventory/ui/useInventorySubmodules.tsx:71#: apps/erp/app/routes/x+/inventory+/tracked-entities.tsx:16#: apps/erp/app/routes/x+/issue+/$id.tsx:147diff --git a/packages/locale/locales/fr/erp.po b/packages/locale/locales/fr/erp.poindex 72c67e07c5..887447b38b 100644--- a/packages/locale/locales/fr/erp.po+++ b/packages/locale/locales/fr/erp.po@@ -4607,7 +4607,7 @@ msgstr "Modifier le type d'employé"msgid "Edit expiration date"msgstr "Modifier la date d'expiration"-#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:242+#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:245msgid "Edit Expiry"msgstr "Modifier l'expiration"@@ -13859,7 +13859,7 @@ msgstr "Suivez chaque modification apportée à vos commandes, factures, clientsmsgid "Track when batches or serials of this item expire."msgstr "Suivez l'expiration des lots ou numéros de série de cet article."-#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:257+#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:260#: apps/erp/app/modules/inventory/ui/useInventorySubmodules.tsx:71#: apps/erp/app/routes/x+/inventory+/tracked-entities.tsx:16#: apps/erp/app/routes/x+/issue+/$id.tsx:147diff --git a/packages/locale/locales/hi/erp.po b/packages/locale/locales/hi/erp.poindex 312c93cf7f..26f832065b 100644--- a/packages/locale/locales/hi/erp.po+++ b/packages/locale/locales/hi/erp.po@@ -4607,7 +4607,7 @@ msgstr "कर्मचारी प्रकार संपादित करmsgid "Edit expiration date"msgstr "समाप्ति तारीख संपादित करें"-#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:242+#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:245msgid "Edit Expiry"msgstr "समाप्ति तिथि संपादित करें"@@ -13859,7 +13859,7 @@ msgstr "अपने ऑर्डर, इनवॉइस, ग्राहकोmsgid "Track when batches or serials of this item expire."msgstr "इस आइटम के बैच या सीरीज़ कब समाप्त होते हैं, इसे ट्रैक करें।"-#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:257+#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:260#: apps/erp/app/modules/inventory/ui/useInventorySubmodules.tsx:71#: apps/erp/app/routes/x+/inventory+/tracked-entities.tsx:16#: apps/erp/app/routes/x+/issue+/$id.tsx:147diff --git a/packages/locale/locales/it/erp.po b/packages/locale/locales/it/erp.poindex b745406fba..64a3e226c1 100644--- a/packages/locale/locales/it/erp.po+++ b/packages/locale/locales/it/erp.po@@ -4607,7 +4607,7 @@ msgstr "Modifica Tipo di Dipendente"msgid "Edit expiration date"msgstr "Modifica data di scadenza"-#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:242+#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:245msgid "Edit Expiry"msgstr "Modifica Scadenza"@@ -13859,7 +13859,7 @@ msgstr "Traccia ogni modifica ai tuoi ordini, fatture, clienti, fornitori e altrmsgid "Track when batches or serials of this item expire."msgstr "Traccia quando i lotti o i numeri seriali di questo articolo scadono."-#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:257+#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:260#: apps/erp/app/modules/inventory/ui/useInventorySubmodules.tsx:71#: apps/erp/app/routes/x+/inventory+/tracked-entities.tsx:16#: apps/erp/app/routes/x+/issue+/$id.tsx:147diff --git a/packages/locale/locales/ja/erp.po b/packages/locale/locales/ja/erp.poindex 8a6d6c38fb..f3ca9de270 100644--- a/packages/locale/locales/ja/erp.po+++ b/packages/locale/locales/ja/erp.po@@ -4607,7 +4607,7 @@ msgstr "従業員タイプを編集"msgid "Edit expiration date"msgstr "有効期限を編集"-#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:242+#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:245msgid "Edit Expiry"msgstr "有効期限を編集"@@ -13859,7 +13859,7 @@ msgstr "ご注文、請求書、顧客、仕入先など、すべての変更をmsgid "Track when batches or serials of this item expire."msgstr "このアイテムのバッチまたはシリアルの有効期限を追跡します。"-#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:257+#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:260#: apps/erp/app/modules/inventory/ui/useInventorySubmodules.tsx:71#: apps/erp/app/routes/x+/inventory+/tracked-entities.tsx:16#: apps/erp/app/routes/x+/issue+/$id.tsx:147diff --git a/packages/locale/locales/pl/erp.po b/packages/locale/locales/pl/erp.poindex 97fdd57326..674dabfcf4 100644--- a/packages/locale/locales/pl/erp.po+++ b/packages/locale/locales/pl/erp.po@@ -4607,7 +4607,7 @@ msgstr "Edytuj typ pracownika"msgid "Edit expiration date"msgstr "Edytuj datę wygaśnięcia"-#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:242+#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:245msgid "Edit Expiry"msgstr "Edytuj datę ważności"@@ -13859,7 +13859,7 @@ msgstr "Śledź każdą zmianę w swoich zamówieniach, fakturach, klientach, domsgid "Track when batches or serials of this item expire."msgstr "Śledź, kiedy partie lub numery seryjne tego artykułu wygasają."-#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:257+#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:260#: apps/erp/app/modules/inventory/ui/useInventorySubmodules.tsx:71#: apps/erp/app/routes/x+/inventory+/tracked-entities.tsx:16#: apps/erp/app/routes/x+/issue+/$id.tsx:147diff --git a/packages/locale/locales/pt/erp.po b/packages/locale/locales/pt/erp.poindex c11ae09698..d4159df069 100644--- a/packages/locale/locales/pt/erp.po+++ b/packages/locale/locales/pt/erp.po@@ -4607,7 +4607,7 @@ msgstr "Editar Tipo de Funcionário"msgid "Edit expiration date"msgstr "Editar data de expiração"-#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:242+#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:245msgid "Edit Expiry"msgstr "Editar Validade"@@ -13859,7 +13859,7 @@ msgstr "Rastreie todas as alterações em seus pedidos, faturas, clientes, fornemsgid "Track when batches or serials of this item expire."msgstr "Rastreie quando os lotes ou números de série deste item expiram."-#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:257+#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:260#: apps/erp/app/modules/inventory/ui/useInventorySubmodules.tsx:71#: apps/erp/app/routes/x+/inventory+/tracked-entities.tsx:16#: apps/erp/app/routes/x+/issue+/$id.tsx:147diff --git a/packages/locale/locales/ru/erp.po b/packages/locale/locales/ru/erp.poindex ee6d4efd10..272d649584 100644--- a/packages/locale/locales/ru/erp.po+++ b/packages/locale/locales/ru/erp.po@@ -4607,7 +4607,7 @@ msgstr "Редактировать тип сотрудника"msgid "Edit expiration date"msgstr "Изменить дату истечения"-#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:242+#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:245msgid "Edit Expiry"msgstr "Редактировать срок годности"@@ -13859,7 +13859,7 @@ msgstr "Отслеживайте каждое изменение ваших заmsgid "Track when batches or serials of this item expire."msgstr "Отслеживайте, когда партии или серийные номера этого товара истекают."-#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:257+#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:260#: apps/erp/app/modules/inventory/ui/useInventorySubmodules.tsx:71#: apps/erp/app/routes/x+/inventory+/tracked-entities.tsx:16#: apps/erp/app/routes/x+/issue+/$id.tsx:147diff --git a/packages/locale/locales/zh/erp.po b/packages/locale/locales/zh/erp.poindex aed918cdea..5840c89a48 100644--- a/packages/locale/locales/zh/erp.po+++ b/packages/locale/locales/zh/erp.po@@ -4607,7 +4607,7 @@ msgstr "编辑员工类型"msgid "Edit expiration date"msgstr "编辑过期日期"-#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:242+#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:245msgid "Edit Expiry"msgstr "编辑过期日期"@@ -13859,7 +13859,7 @@ msgstr "跟踪对您的订单、发票、客户、供应商等的每项更改。msgid "Track when batches or serials of this item expire."msgstr "跟踪此项目的批次或序列号何时过期。"-#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:257+#: apps/erp/app/modules/inventory/ui/Traceability/TrackedEntitiesTable.tsx:260#: apps/erp/app/modules/inventory/ui/useInventorySubmodules.tsx:71#: apps/erp/app/routes/x+/inventory+/tracked-entities.tsx:16#: apps/erp/app/routes/x+/issue+/$id.tsx:147diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 560c251002..96358b0cc1 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -1910,6 +1910,9 @@ importers:typescript:specifier: 5.8.3version: 5.8.3+ vitest:+ specifier: 'catalog:'+ version: 4.1.4(@opentelemetry/[email protected])(@types/[email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected]))packages/documents:dependencies:@@ -3451,24 +3454,28 @@ packages:engines: {node: '>=14.21.3'}cpu: [arm64]os: [linux]+ libc: [musl]'@biomejs/[email protected]':resolution: {integrity: sha512-Uo1OJnIkJgSgF+USx970fsM/drtPcQ39I+JO+Fjsaa9ZdCN1oysQmy6oAGbyESlouz+rzEckLTF6DS7cWse95g==}engines: {node: '>=14.21.3'}cpu: [arm64]os: [linux]+ libc: [glibc]'@biomejs/[email protected]':resolution: {integrity: sha512-YGLkqU91r1276uwSjiUD/xaVikdxgV1QpsicT0bIA1TaieM6E5ibMZeSyjQ/izBn4tKQthUSsVZacmoJfa3pDA==}engines: {node: '>=14.21.3'}cpu: [x64]os: [linux]+ libc: [musl]'@biomejs/[email protected]':resolution: {integrity: sha512-QDPMD5bQz6qOVb3kiBui0zKZXASLo0NIQ9JVJio5RveBEFgDgsvJFUvZIbMbUZT3T00M/1wdzwWXk4GIh0KaAw==}engines: {node: '>=14.21.3'}cpu: [x64]os: [linux]+ libc: [glibc]'@biomejs/[email protected]':resolution: {integrity: sha512-H4IoCHvL1fXKDrTALeTKMiE7GGWFAraDwBYFquE/L/5r1927Te0mYIGseXi4F+lrrwhSWbSGt5qPFswNoBaCxg==}@@ -4310,30 +4317,35 @@ packages:engines: {node: '>= 10'}cpu: [arm64]os: [linux]+ libc: [glibc]'@napi-rs/[email protected]':resolution: {integrity: sha512-kKmSkQVnWeqg7qdsiXvYxKhAFuHz3tkBjW/zyQv5YKUPhotpaVhpBGv5LqCngzyuRV85SXoe+OFj+Tv0a0QXkQ==}engines: {node: '>= 10'}cpu: [arm64]os: [linux]+ libc: [musl]'@napi-rs/[email protected]':resolution: {integrity: sha512-Jc7I3A51jnEOIAXeLsN/M/+Z28LUeakcsXs07FLq9prXc0eYOtVwsDEv913Gr+06IRo34gJJVgT0TXvmz+N2VA==}engines: {node: '>= 10'}cpu: [riscv64]os: [linux]+ libc: [glibc]'@napi-rs/[email protected]':resolution: {integrity: sha512-iDUBe7AilfuBSRbSa8/IGX38Mf+iCSBqoVKLSQ5XaY2JLOaqz1TVyPFEyIck7wT6mRQhQt5sN6ogfjIDfi74tg==}engines: {node: '>= 10'}cpu: [x64]os: [linux]+ libc: [glibc]'@napi-rs/[email protected]':resolution: {integrity: sha512-AKLFd/v0Z5fvgqBDqhvqtAdx+fHMJ5t9JcUNKq4FIZ5WH+iegGm8HPdj00NFlCSnm83Fp3Ln8I2f7uq1aIiWaA==}engines: {node: '>= 10'}cpu: [x64]os: [linux]+ libc: [musl]'@napi-rs/[email protected]':resolution: {integrity: sha512-u883Yr6A6fO7Vpsy9YE4FVCIxzzo5sO+7pIUjjoDLjS3vQaNMkVzx5bdIpEL+ob+gU88WDK4VcxYMZ6nmnoX9A==}@@ -6659,66 +6671,79 @@ packages:resolution: {integrity: sha512-L+34Qqil+v5uC0zEubW7uByo78WOCIrBvci69E7sFASRl0X7b/MB6Cqd1lky/CtcSVTydWa2WZwFuWexjS5o6g==}cpu: [arm]os: [linux]+ libc: [glibc]'@rollup/[email protected]':resolution: {integrity: sha512-n83O8rt4v34hgFzlkb1ycniJh7IR5RCIqt6mz1VRJD6pmhRi0CXdmfnLu9dIUS6buzh60IvACM842Ffb3xd6Gg==}cpu: [arm]os: [linux]+ libc: [musl]'@rollup/[email protected]':resolution: {integrity: sha512-Nql7sTeAzhTAja3QXeAI48+/+GjBJ+QmAH13snn0AJSNL50JsDqotyudHyMbO2RbJkskbMbFJfIJKWA6R1LCJQ==}cpu: [arm64]os: [linux]+ libc: [glibc]'@rollup/[email protected]':resolution: {integrity: sha512-+pUymDhd0ys9GcKZPPWlFiZ67sTWV5UU6zOJat02M1+PiuSGDziyRuI/pPue3hoUwm2uGfxdL+trT6Z9rxnlMA==}cpu: [arm64]os: [linux]+ libc: [musl]'@rollup/[email protected]':resolution: {integrity: sha512-VSvgvQeIcsEvY4bKDHEDWcpW4Yw7BtlKG1GUT4FzBUlEKQK0rWHYBqQt6Fm2taXS+1bXvJT6kICu5ZwqKCnvlQ==}cpu: [loong64]os: [linux]+ libc: [glibc]'@rollup/[email protected]':resolution: {integrity: sha512-4LqhUomJqwe641gsPp6xLfhqWMbQV04KtPp7/dIp0nzPxAkNY1AbwL5W0MQpcalLYk07vaW9Kp1PBhdpZYYcEw==}cpu: [loong64]os: [linux]+ libc: [musl]'@rollup/[email protected]':resolution: {integrity: sha512-tLQQ9aPvkBxOc/EUT6j3pyeMD6Hb8QF2BTBnCQWP/uu1lhc9AIrIjKnLYMEroIz/JvtGYgI9dF3AxHZNaEH0rw==}cpu: [ppc64]os: [linux]+ libc: [glibc]'@rollup/[email protected]':resolution: {integrity: sha512-RMxFhJwc9fSXP6PqmAz4cbv3kAyvD1etJFjTx4ONqFP9DkTkXsAMU4v3Vyc5BgzC+anz7nS/9tp4obsKfqkDHg==}cpu: [ppc64]os: [linux]+ libc: [musl]'@rollup/[email protected]':resolution: {integrity: sha512-QKgFl+Yc1eEk6MmOBfRHYF6lTxiiiV3/z/BRrbSiW2I7AFTXoBFvdMEyglohPj//2mZS4hDOqeB0H1ACh3sBbg==}cpu: [riscv64]os: [linux]+ libc: [glibc]'@rollup/[email protected]':resolution: {integrity: sha512-RAjXjP/8c6ZtzatZcA1RaQr6O1TRhzC+adn8YZDnChliZHviqIjmvFwHcxi4JKPSDAt6Uhf/7vqcBzQJy0PDJg==}cpu: [riscv64]os: [linux]+ libc: [musl]'@rollup/[email protected]':resolution: {integrity: sha512-wcuocpaOlaL1COBYiA89O6yfjlp3RwKDeTIA0hM7OpmhR1Bjo9j31G1uQVpDlTvwxGn2nQs65fBFL5UFd76FcQ==}cpu: [s390x]os: [linux]+ libc: [glibc]'@rollup/[email protected]':resolution: {integrity: sha512-77PpsFQUCOiZR9+LQEFg9GClyfkNXj1MP6wRnzYs0EeWbPcHs02AXu4xuUbM1zhwn3wqaizle3AEYg5aeoohhg==}cpu: [x64]os: [linux]+ libc: [glibc]'@rollup/[email protected]':resolution: {integrity: sha512-5cIATbk5vynAjqqmyBjlciMJl1+R/CwX9oLk/EyiFXDWd95KpHdrOJT//rnUl4cUcskrd0jCCw3wpZnhIHdD9w==}cpu: [x64]os: [linux]+ libc: [musl]'@rollup/[email protected]':resolution: {integrity: sha512-cl0w09WsCi17mcmWqqglez9Gk8isgeWvoUZ3WiJFYSR3zjBQc2J5/ihSjpl+VLjPqjQ/1hJRcqBfLjssREQILw==}diff --git a/setup.sh b/setup.shindex b8c7863ac7..8d9484f066 100755--- a/setup.sh+++ b/setup.sh@@ -97,6 +97,22 @@ repo_root() {|| { fail "not inside a git repo (cd into the carbon checkout first)"; exit 1; }}+to_shell_path() {+ local path="$1"+ case "$(uname -s)" in+ MINGW*|MSYS*|CYGWIN*)+ if command -v cygpath >/dev/null 2>&1; then+ cygpath -u "$path"+ else+ printf '%s\n' "$path"+ fi+ ;;+ *)+ printf '%s\n' "$path"+ ;;+ esac+}+detect_rc() {if [[ -n "${RC_FILE:-}" ]]; then printf '%s\n' "$RC_FILE"; return; ficase "${SHELL:-}" in@@ -333,8 +349,9 @@ install() {;;esac- local repo rc+ local repo repo_shell rcrepo="$(repo_root)"+ repo_shell="$(to_shell_path "$repo")"rc="$(detect_rc)"mkdir -p "$(dirname "$rc")"touch "$rc"@@ -366,7 +383,7 @@ install() {{printf '\n'- block_for "$repo" "$shell"+ block_for "$repo_shell" "$shell"printf '\n'} >> "$rc"@@ -385,7 +402,7 @@ install() {printf ' %s\n' "$(kbd "source ./setup.sh")"hdr "Verify"- printf ' %s\n' "$(dim "which crbn # -> $repo/packages/dev/bin/crbn")"+ printf ' %s\n' "$(dim "which crbn # -> $repo_shell/packages/dev/bin/crbn")"printf ' %s\n\n' "$(dim "crbn # -> help")"}