From 22df89c6f38b4ee3fb6b4565bef62390696b2408 Mon Sep 17 00:00:00 2001 From: Reinhard Handler Date: Mon, 30 Sep 2024 07:59:51 +0000 Subject: [PATCH 1/2] Check extname on cmd0 only --- packages/collector-extension/lib/util/run-command.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/collector-extension/lib/util/run-command.js b/packages/collector-extension/lib/util/run-command.js index ae604af..ef08927 100644 --- a/packages/collector-extension/lib/util/run-command.js +++ b/packages/collector-extension/lib/util/run-command.js @@ -23,7 +23,7 @@ async function runCommand (cmd = '', opts = {}) { cmdv = cmdv.map((it) => (~it.indexOf('$') ? it.replace(ENV_NAME_RX, '%$1%') : it)) } else { const bare = !~cmd0.indexOf(ospath.sep) - if (ospath.extname(cmd)) { + if (ospath.extname(cmd0)) { if (bare && local) cmdv[0] = '.' + ospath.sep + cmd0 } else { if (bare && !local) { -- GitLab From dabd7ee239cef5c403940f942ac0e80dfec3f9e6 Mon Sep 17 00:00:00 2001 From: Reinhard Handler Date: Mon, 30 Sep 2024 11:41:43 +0200 Subject: [PATCH 2/2] Modified test-batch-script configuration for #36 Added an argument containing a . to reproduce #36 on windows. --- .../test/fixtures/test-batch-script/docs/antora.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/collector-extension/test/fixtures/test-batch-script/docs/antora.yml b/packages/collector-extension/test/fixtures/test-batch-script/docs/antora.yml index 32d2def..b2d8479 100644 --- a/packages/collector-extension/test/fixtures/test-batch-script/docs/antora.yml +++ b/packages/collector-extension/test/fixtures/test-batch-script/docs/antora.yml @@ -3,5 +3,5 @@ version: '${project.version}' ext: collector: run: - command: ./mvnw process-resources + command: ./mvnw -D antora.collector.extension=true process-resources scan: target/docs -- GitLab