Open icedvariables opened 9 years ago
What operating system are you running? Knowing that would help a bit. ;)
Caleb
Sorry, I'm on Windows 7 at the moment. If I recall correctly this hasn't affected my linux machines.
Ah, figured. I believe I know what the issue is, then.
Script (this package) reads the shebang line at the top of each script you execute (if the shebang exists). However, the path /usr/local/bin
only exists on Unix systems; it doesn't exist on Windows (I'm not even sure Windows considers that a valid path).
@rgbkrk or @erran: I'm not sure what you'd like to do about this. It might be easiest (and less unpredictable) to simple ignore the shebang line if the detected platform is Windows. That's entirely up to you, though; perhaps you see a better solution to this.
That makes total sense to ignore the shebang line when on Windows.
It would be great to have an option in the settings panel for toggling between ignoring or respecting shebangs.
Same issue here. Modifying files in Windows and then running in Linux.
I removed the shebang from each of my python files and so I have to run the scripts using python *.py
instead of ./*.py
Not a big deal but it would be nice, as @dessant said, to ignore the shebang line on Windows or at least assume that #!/usr/bin/env INTERPRETTER
will check the PATH for the interpretter.
That makes total sense to ignore the shebang line when on Windows.
but you can use shebang on win-system. confirmed by myself :) maybe you could check the path for existance, and if so run it, otherwise ignore?
@nixel2007 how do you use the shebang? The idea is that the same shebang line needs to work on both windows and *nix. I use the ubiquitous #!/usr/bin/env python
in order to run on Linux.
Do you know of another shebang that's cross platform and works in atom-script?
@nitrocode neh, no cross platform way. You need to put something like #!c/progra~3/OneScript/bin/oscript.exe (but for python) to make it executable on win. Just want to point, that shebang technically works
When I try to run a python script with a shebang like
#!/usr/bin/env python
I get the errorThe system cannot find the path specified.
When I remove the shebang the script works as normal however. Is this a problem with Atom starting in the wrong directory? I tried starting it from the command line in root but that didn't fix it.This is also likely a problem for most scripts (I believe this occurs when running Perl scripts as well).