-
Notifications
You must be signed in to change notification settings - Fork 664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
~/.bash_profile not being loaded? #77
Comments
It's also the same problem when executing a straight command from ssh (without interactive console):
So I guess it's not. If anyone knows why this that would be super helpful. Anyways, closing the issue since it's probably unrelated. |
did you find a way around this? |
@pkyeck You may have to check your
You could try just setting PS1 before conn.exec("PS1='\u@\h:\w\$ ' source ~/.bashrc; echo Hooray", function(err, stream) {
// ...
}); |
thanks for getting back. |
@pkyeck what you had to do to make that work? |
@alansikora easiest way for me right now is to use the |
@pkyeck it works, but some of my method calls I need the result printed out so I can get it, and seems like the "shell" result is cluttered with some info I do not need. Any other ideias? Thank you, by the way! :D |
@alansikora A little trick I use: Set the interactive flag before
|
@gdraganic The |
@mscdex Didn't work for me even with
This is the begging of my
Setting the interactive flag before |
Hey there, not sure if this is the best place to ask but I thought I'd try.
I just setup a basic micro instance on EC2 on ubuntu 12.04, and then installed node like this (modified from here):
When I ssh into the instance and run
node -v
, it printsv0.10.17
as expected. I ssh like this:But when I try to do the same thing using this ssh2 module, it prints:
The main difference between the two is this: when I
ssh -i ...
, it takes me to an interactive shell, whereas with node's ssh2 module I am executing the command (rather than running an interactive shell, I think, (exec vs. shell methods)). The strange thing is, using either method, if Icat ~/.bashrc
, they both are exactly the same. The last thing is, I can successfully execute thenode -v
command on ssh2 if I addsource ~/.bash_profile
before, so:The original install script echoed the
PATH
to~/.bashrc
, but I modified it to~/.bash_profile
because that was the only thing that seemed to work (along with adding thesource ~/.bash_profile
to the command).Any ideas why this is happening? Is this something to do with ssh2 and ubuntu, or is this an issue with the node module?
The text was updated successfully, but these errors were encountered: