FlamingTempura / bibtex-tidy

Cleaner and Formatter for BibTeX files
https://flamingtempura.github.io/bibtex-tidy/
MIT License
832 stars 63 forks source link

bibtex-tidy takes perfectly good argv and destroys it with `.join` #428

Closed flying-sheep closed 5 days ago

flying-sheep commented 5 months ago

there’s a reason that argv is an array, which is that individual elements can contain spaces. E.g. file paths. Please never .join it

https://github.com/FlamingTempura/bibtex-tidy/blob/98701a8bfb5a98ccd3ed43db679f525714599d72/src/cli/cli.ts#L25

FlamingTempura commented 5 months ago

I'm not sure if you intended to come off abrasively there but remember this is an open source project.

That said, I see how this is a legitimate issue. May be a while until I can get around to fixing this. PR welcome.

flying-sheep commented 5 months ago

Hi! I meant it more humorously, sorry that it came over that way. I guess the juxtaposition of funny title and matter-of-fact issue body together can be read as sardonic.

About the topic at hand: I think it might be more robust to shop for a command line arg parser than to roll your own here.

That would also fix issues like https://github.com/FlamingTempura/bibtex-tidy/issues/419 (see https://github.com/FlamingTempura/bibtex-tidy/issues/419#issuecomment-2042144572 for what’s wrong there)

FlamingTempura commented 5 days ago

Fixed in v1.14.0

flying-sheep commented 5 days ago

Great, thanks!