Skip to content

Commit

Permalink
Add a not-yet-implemented warning for exec (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
moul committed Oct 8, 2015
1 parent 20e9b05 commit ba6dbd1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -140,6 +140,7 @@ GLOBAL OPTIONS:

### master (unreleased)

* Add a not-yet-implemented warning for exec ([#51](https://github.com/moul/ssh2docker/issues/51))
* Support of `--local-user` option, to allow a specific user to be a local shell ([#44](https://github.com/moul/ssh2docker/issues/44))
* Kill connection when exiting shell (ctrl+D) ([#43](https://github.com/moul/ssh2docker/issues/43))

Expand Down
9 changes: 9 additions & 0 deletions client.go
Expand Up @@ -8,6 +8,7 @@ import (
"strings"
"sync"
"syscall"
"time"

"github.com/moul/ssh2docker/vendor/github.com/Sirupsen/logrus"
"github.com/moul/ssh2docker/vendor/github.com/kr/pty"
Expand Down Expand Up @@ -213,6 +214,14 @@ func (c *Client) HandleChannelRequests(channel ssh.Channel, requests <-chan *ssh
once.Do(close)
}()

case "exec":
command := string(req.Payload)
logrus.Debugf("HandleChannelRequests.req exec: %q", command)
ok = false

fmt.Fprintln(channel, "⚠️ ssh2docker: exec is not yet implemented. https://github.com/moul/ssh2docker/issues/51.")
time.Sleep(3 * time.Second)

case "pty-req":
ok = true
termLen := req.Payload[3]
Expand Down

0 comments on commit ba6dbd1

Please sign in to comment.