Breaks on Blank Line After Shebang
Closed this issue · 1 comments
madranet commented
Just a minor detail this but it caught me out when I first tried to run nimcr
as I always insert a blank line after my #shebang
when scripting.
#!/usr/bin/env nimcr
echo "howdy!"
works as expected:
$: ./nimscripting.nim
howdy!
However, this:
#!/usr/bin/env nimcr
echo "howdy!"
will give an error:
$: ./nimscripting.nim
fatal.nim(39) sysFatal
Error: unhandled exception: index out of bounds, the container is empty [IndexError]
I don't know if it's fixable or even worth fixing, but thought it worth mentioning for anyone else whose muscle memory causes them to hit RETURN
twice after typing in the #shebang
line.
[You wouldn't believe how many times I switched back and forth between my version and your example script, wondering why the hell I couldn't get it to run –until I eventually spotted that extra newline!]
geotre commented
This caught me out too