external tools' environment
Hi,
Me OS: OS X 10.6.6
I need to be running several external command line 3rd party tools, which heavily rely on other programs. Eg.: packages from NPM - Node Package Manager
Those rely on node being installed and available via the PATH environment.
Now damn me if I haven't tried setting up PATH for both login and non-login shells. I've tested it, and it worked in both of them.
Yet if the called node package references the node environment like:
#!/usr/bin/env node
It seems not to recognize what 'node' is.
I need to know, how does the WebIDE run those commands? Is there a way to include some IDE-only invocation file, like .basrc?
TIA!
Please sign in to leave a comment.
Hi! Could you explain your problem once more? You add "node" as external tool, specifying command "node", and it is not recognized, allthough this command works is all shells, do you? What error exactly do you get?
Sorry - double post. Can't find a way to delete a post. ;)
I assuming you talking node.js?
and you get "see it" in PHPStorm?
Edit:
Oh hold on.. I got it now. You need to access the package manager from within PHpStorm?
Man, node.js is moving FAST. I didn't even know it had a package manager, ;) I'm gonna install it.
Another edit:
Also someone chime in, does PHpStorm understand a #! (shebang) line?
Well, yes, i get "see it" with these settings:
Did you restart IDE after setting $PATH$? Not sure about other OS'es, but on Windows threads don't see system variables changes made after thread's start.
Ok, I'll try to be as precise as possible:
The conclusion for me from above facts are:
Another experiment I made is just trying to run the jshint command in the IDE. The result had me buffled:
EDIT: well, not anymore - the IDE's shell just doesn't have the PATHs I need to launch the tools and which they rely on; if everything depended on is declared as absolute path, it works; once it starts relying on environment variables, it breaks.
And yes, I have restarted the IDE after each try to change something in my environments configuration.
Message was edited by: Marek Stasikowski
I guess the only workaround is setting external tool this way: set program node, or with full path - both configurations work for me, and provide parameters $full_path_to_jshint$ $FilePath$ .
Yeah, this seems like a workaround for now. But shouldn't I report this as a bug/feature request?
Sure you are welcome to post feature request here.
right now only a workaround available, as described by Elena; feature request created at http://youtrack.jetbrains.net/issue/WI-6461
What do you mean by "understand"? I've just made a test, script TestVariables.sh
#!/bin/csh
echo $PATH
was run with Command Line Tool Support with .\TestVariables.sh command. I got string /bin/csh /home/leneshka/TestProject/testVariables.sh in ps output instead of usual /bin/sh /home/leneshka/TestProject/testVariables.sh
Bizzarre it be, but I got it working by accident. I don't know how, but I stumbled upon some stack overflow topic, and one person adviced to change the contents of
And it worked! PHPStorm properly executes all the programs I installed with NPM.
More info here: http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/EnvironmentVars.html
Great, Marek! I'm currently writing a topic about setting and testing cli tools in IDEs. environment.plist will be there as tested and recommended place for Mac.