Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
livescript binary eats all of argv #569
Consider the following node program test.js:
When I run the program "node test.js hello" it prints:
LiveScript was behaving like this but with 1.3 it eats all arguments. Consider the following livescript program test.ls:
When I run this in 1.3 I get an error message from livescript:
It seems as if anything passed to the command line is consumed and processed by lsc.
Not completely right. With this patch the argv contains an extra argument. Livescript.run evaluates the compiled code with the argv as passed to the compiler, making my argv:
I don't think this is the desired result and the behaviour should match node as close as possible?
referenced this issue
Oct 20, 2014
Maybe I am doing something wrong; I have a
#!/usr/bin/env lsc ... here I process a `-w` option from process.argv ...
Before (~1.2), I was using the script like this:
$ ./script.ls -w
With 1.3.1, I have to put
$ ./script.ls -- -w