repositories / pi-ext

pi-ext

bugabingas pi extensions

owned by bugabinga

fix: restore cross-platform validation

b94611e9cf2b7cddf403fd0d44e6801a942067d5

Oliver Krylow <o.krylow@isp-insoft.de> ·

SSH signature · not checked

Browse filesCompare with HEAD

Changed files (2)

extensions/nu-bang/__tests__/real-world-full.test.ts

Modified
325 325 test("shows nu's native delimiter diagnostics", async () => {
326 326 const result = await run("[1 2 3");
327 327 expect(result.exitCode).toBe(1);
328 - expect(result.output).toContain("Unclosed delimiter");
328 + expect(result.output).toContain("nu::parser::unexpected_eof");
329 + expect(result.output).toContain("expected closing ]");
331 332 test("reports a missing working directory clearly", async () => {

scripts/e2e_android.mjs

Modified
3 3 #!/usr/bin/env node
4 4 import { spawnSync } from "node:child_process";
5 5 import { createHash } from "node:crypto";
6 6 import { mkdirSync } from "node:fs";
7 7 import { homedir } from "node:os";
8 -import { dirname, join } from "node:path";
8 +import { dirname, posix } from "node:path";
9 9 import process from "node:process";
10 10 import { fileURLToPath, pathToFileURL } from "node:url";
14 14 export function linuxModulesDir(root, home = homedir()) {
15 15 const key = createHash("sha256").update(root).digest("hex").slice(0, 12);
16 - return join(home, ".cache", "pi-ext", "e2e-linux", key, "node_modules");
16 + return posix.join(home, ".cache", "pi-ext", "e2e-linux", key, "node_modules");
19 19 export function prootArgs(root, modulesDir) {
20 20 return [
21 21 "login",
22 22 "--bind",
23 - `${modulesDir}:${join(root, "node_modules")}`,
23 + `${modulesDir}:${posix.join(root, "node_modules")}`,
24 24 "--work-dir",
25 25 root,
26 26 DISTRO,