From 65e517f783fdfda2746d0d2d1bb214e2f53bdd8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20L=C3=BCtke?= Date: Fri, 22 May 2026 20:21:12 +0000 Subject: [PATCH] Enhance launcher shebang polyglot to fall back to Bun if Node is missing on the system Result: {"status":"keep","test_status":0} --- autoresearch.jsonl | 1 + bin/qmd | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/autoresearch.jsonl b/autoresearch.jsonl index dae2eb6..d65d529 100644 --- a/autoresearch.jsonl +++ b/autoresearch.jsonl @@ -1,2 +1,3 @@ {"type":"config","name":"Fixing Windows execution wrapper regression by rewriting launcher in Node.js","metricName":"test_status","metricUnit":"","bestDirection":"lower"} {"run":1,"commit":"65b813d","metric":0,"metrics":{},"status":"keep","description":"Rewrite launcher in Node.js to fix Windows execution and keep tests passing","timestamp":1779480224809,"segment":0,"confidence":null,"asi":{"hypothesis":"Rewrite launcher in Node.js to enable native cmd/ps1 wrappers on Windows, and adjust mock node in tests to delegate wrapper execution"}} +{"run":2,"commit":"7a5d8f5","metric":0,"metrics":{},"status":"keep","description":"Make bin/qmd launcher a shebang polyglot to support both Windows cmd/ps1 native wrappers and sh-invoked smoke tests","timestamp":1779480529550,"segment":0,"confidence":null,"asi":{"hypothesis":"Convert launcher to a polyglot shell/JS script starting with #!/usr/bin/env node, and fix JS falsy env-var evaluation to support package-smoke tests"}} diff --git a/bin/qmd b/bin/qmd index 344cbd8..a5d583f 100755 --- a/bin/qmd +++ b/bin/qmd @@ -1,5 +1,5 @@ #!/usr/bin/env node -// 2>/dev/null; exec node "$0" "$@" +// 2>/dev/null; if command -v node >/dev/null 2>&1; then exec node "$0" "$@"; else exec bun "$0" "$@"; fi // Cross-platform launcher for qmd. // // Previously this was a POSIX shell script with `#!/bin/sh`, which meant npm