Closed ghost closed 6 years ago
Would you please share:
node --version
)lsc --version
)console.log arg for arg in process.argv
1.5.0
9.4.0
at shell i am running ~lsc temp.lsc arg1 arg2
The code you pasted doesn't compile with lsc 1.5.0 (try it on http://livescript.net/). Either that's not literally the code you've been trying to run, or maybe you have a rather old lsc hanging around somewhere?
my fault, this is the correct code: for arg in process.argv then console.log arg
it still would not work on livescript.net since process
is not accessible
I'm not sure what's going wrong for you. Here's me running that same code in a fresh Docker container with Node 9.4 and LiveScript 1.5:
% docker run -it --rm node:9.4 bash
root@1fab59a7aae2:/# npm install -g livescript
/usr/local/bin/lsc -> /usr/local/lib/node_modules/livescript/bin/lsc
+ livescript@1.5.0
added 9 packages in 1.07s
root@1fab59a7aae2:/# cat > temp.ls
for arg in process.argv
console.log arg
root@1fab59a7aae2:/# lsc temp.ls arg1 arg2
/usr/local/bin/lsc
/temp.ls
arg1
arg2
root@1fab59a7aae2:/#
huh that's weird. running it by itself im getting
/usr/bin/node
/home/jzeus/repo/etc/livescript/bin/lsc
temp.lsc
but you are not getting the node
as an argument? i noticed that you actually mention this in #916 and have made a commit to fix it, but somehow this is not working for me. i pulled the latest version of the repo and tried with different shells...
Ahhh, you're running LiveScript from master, not the published version? I can reproduce the issue on master.
If running published 1.5.0 is an option for you, I would recommend that as a workaround until I get this sorted out.
yea i started compiling from master when i realized the published version did not have a fix in place for await
Well, since you're already hanging out on the bleeding edge, you can take the fix/LiveScript-1013
branch of my fork for a spin and see if that works for you. My usual approach is to wait around a week for community feedback before merging most changes to master here, so if you're impatient for a fix, that's the thing to do.
sweet
do you mind me asking where the community feedback takes place? i want to get more involved with livescript development if possible
Right here on GitHub, for the most part. I'm not generally on IRC unless I'm asked to be, but some people hang out in a #livescript channel on Freenode as well.
ah i see you made a pull request, i appreciate the quick fix
hoping to start reading through livescript code, i have been looking for a project to contribute to and i have been loving ls
so far
my apologies if i am being stupid, but i can not manage to pass arguments to a
#!/usr/bin/env lsc
executable on the command line, aslsc
attempts to read them as additional input filesmy expected behavior was for any arguments after the input file to be passed onto the script and available with
process.argv
i have tried with
--
as suggested in #610, and i have been reading similar issues (#569, #587, #589, etc) to find a solution to no availany guidance would be appreciated.