jieguangzhou opened a new issue, #333:
URL: https://github.com/apache/mina-sshd/issues/333

   ### Version
   
   2.9.0
   
   ### Bug description
   
   When I execute the command "source ~.bashrc", it doesn't take effect. As 
shown below, there is an environment variable "ABC" in my bashrc, but I can't 
output it.k
   
   The code is as follows:
   ```java
           ClientSession session = client.connect(user, host, 
port).verify().getSession();
           boolean result = session.auth().verify().isSuccess();
           if (result) {
               System.out.println("Success");
           } else {
               System.out.println("Failed");
           }
           System.out.println(result);
   
           String command = "cat ~/.bashrc && source ~/.bashrc && echo $ABC && 
echo END";
           String cmd = String.format(command);
           System.out.println(cmd);
           String executeResult = session.executeRemoteCommand(cmd);
           System.out.println(executeResult);
           client.stop();
   ```
   
   
   
   
   ### Actual behavior
   
   The outputs is as follows:
   ```
   .... some other contents.....
   [ -f ~/.fzf.bash ] && source ~/.fzf.bash
   export ABC=abc
   
   END
   
   ```
   
   ### Expected behavior
   
   I think the output should be 
   
   ```
   .... some other contents.....
   [ -f ~/.fzf.bash ] && source ~/.fzf.bash
   export ABC=abc
   abc
   END
   
   ```
   
   ### Relevant log output
   
   _No response_
   
   ### Other information
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org

Reply via email to