JoeStrout / miniscript

source code of both C# and C++ implementations of the MiniScript scripting language
MIT License
275 stars 64 forks source link

Fix multiple files execution with -i #144

Closed marcgurevitx closed 1 month ago

marcgurevitx commented 6 months ago

I introduced a bug that caused executing every argument on the command line when -i switch is provided:

$ cat >xx.ms
print shellArgs

$ miniscript xx.ms xx.ms xx.ms 
["xx.ms", "xx.ms", "xx.ms"]

$ miniscript -i xx.ms xx.ms xx.ms 
["xx.ms", "xx.ms", "xx.ms"]
["xx.ms", "xx.ms"]
["xx.ms"]

...

This PR should fix it.