diff --git a/packages/collector-extension/lib/util/run-command.js b/packages/collector-extension/lib/util/run-command.js index ae604af024bb70ba6d68aa6f5e93413b54ddc809..ef08927cc872a59958646e94bc734fd7a8906c24 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) { 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 32d2defc0779676bb818835b410b433f1cc3f103..b2d84790af79778eb1646fd29106ed55a6f5c1e1 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