PMunch/nimcr

spaces cause incorrect argument passing

Closed this issue · 3 comments

AvdN commented

If you call examples/testfile.nim klm "abc def" from the shell, the output will be

Hello World!
@["klm", "abc", "def"]

which is incorrect as "abc def" is not passed as a single argument to examples/.testfile.

This is a work-around for limitations with shebangs IIRC, and the system is outlined here: https://github.com/PMunch/nimcr#passing-options

AvdN commented

@PMunch This could also be solved while invoking a shell, by checking each element of args and adding quotes around those that need quoting to survive the shell splitting the arguments again (before calling the executable). So I don't really see the relation.

Oh wait, my bad. I was mixing this with another issue. Yeah that's not supposed to happen.