lgoldstein commented on code in PR #347:
URL: https://github.com/apache/mina-sshd/pull/347#discussion_r1213600038


##########
docs/server-setup.md:
##########
@@ -45,8 +45,7 @@ implementation that you can use if you want. This 
implementation will create a p
 so it's mostly useful to launch the OS native shell. E.g.,
 
 ```java
-sshd.setShellFactory(new ProcessShellFactory(new String[] { "/bin/sh", "-i", 
"-l" }));
-
+sshServer.setShellFactory(new ProcessShellFactory("/bin/sh -i -l", "-i", "-l" 
));
 ```

Review Comment:
   The fix seems wrong - the constructor is defined as
   ```java
   ProcessShellFactory(String command, String... elements) { ... }
   ```
   which means that one could use either
   ```java
   new ProcessShellFactory("/bin/sh", new String[] {"-i", "-l"})
   ```
   or
   ```java
   new ProcessShellFactory("/bin/sh", "-i", "-l" ))
   ```
   but *not*
   ```java
   new ProcessShellFactory("/bin/sh -i -l", "-i", "-l" )
   ```
   since it repeats the command arguments



-- 
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

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