node/test/fixtures/run-script/node_modules/.bin/positional-args.bat
Yagiz Nizipli fe4e569759
src: fix positional args in task runner
PR-URL: https://github.com/nodejs/node/pull/52810
Fixes: https://github.com/nodejs/node/issues/52740
Reviewed-By: Daniel Lemire <daniel@lemire.me>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-05-08 11:37:07 +00:00

16 lines
290 B
Batchfile
Executable File

@echo off
setlocal enabledelayedexpansion
set argv=0
set "output="
for %%x in (%*) do (
Set /A argv+=1
if "!output!" == "" (
Set "output=%%~x"
) else (
Set "output=!output! %%~x"
)
)
@echo Raw '%*'
@echo Arguments: '%output%'
@echo The total number of arguments are: %argv%