Skip to content

Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.

C++

apps/host staging-scripts-syntax test: use Git bash with forward-slash paths on Windows instead of the WSL launcher

Niko12211f52a0037392
diff --git a/apps/host/tests/staging-scripts-syntax.test.mjs b/apps/host/tests/staging-scripts-syntax.test.mjs
index e18f8e857..587e85da7 100644
--- a/apps/host/tests/staging-scripts-syntax.test.mjs
+++ b/apps/host/tests/staging-scripts-syntax.test.mjs
@@ -4,12 +4,16 @@
*/
import test from 'node:test';
import assert from 'node:assert/strict';
-import { readdirSync } from 'node:fs';
+import { existsSync, readdirSync } from 'node:fs';
import { spawnSync } from 'node:child_process';
import { join, resolve } from 'node:path';
const scripts = resolve(import.meta.dirname, '..', '..', 'desktop', 'scripts');
const packaging = resolve(import.meta.dirname, '..', '..', '..', 'packaging');
+// On Windows a bare `bash` can be the WSL launcher in System32, which cannot read a C:\ path (exit 127): use Git bash when it is there.
+const bash = process.platform === 'win32'
+ ? ['C:/Program Files/Git/usr/bin/bash.exe', 'C:/Program Files/Git/bin/bash.exe'].find(p => existsSync(p)) ?? 'bash'
+ : 'bash';
for (const file of readdirSync(scripts).filter(f => f.endsWith('.mjs'))) {
test(`node --check ${file}`, () => {
@@ -20,9 +24,9 @@ for (const file of readdirSync(scripts).filter(f => f.endsWith('.mjs'))) {
for (const file of readdirSync(scripts).filter(f => f.endsWith('.sh'))) {
test(`bash -n ${file}`, t => {
- const probe = spawnSync('bash', ['--version'], { encoding: 'utf8' });
+ const probe = spawnSync(bash, ['--version'], { encoding: 'utf8' });
if (probe.error || probe.status !== 0) { t.skip('no bash here'); return; }
- const r = spawnSync('bash', ['-n', join(scripts, file)], { encoding: 'utf8' });
+ const r = spawnSync(bash, ['-n', join(scripts, file).replaceAll('\\', '/')], { encoding: 'utf8' });
assert.equal(r.status, 0, r.stderr);
});
}