sshd: Fix env error check

Co-Authored-By: Chris Miller <millerlogic@users.noreply.github.com>
This commit is contained in:
Andrey PetrovandChris Miller authored and GitHub committed 2020-01-10 09:25:59 -05:00
1 parent 4aa2460d82
commit 6701cbcbf7
1 file changed
+1 -1
+1 -1
View File
@@ -189,7 +189,7 @@ func (t *Terminal) listen(requests <-chan *ssh.Request) {
}
case "env":
var v EnvVar
if err := ssh.Unmarshal(req.Payload, &v); err != nil {
if err := ssh.Unmarshal(req.Payload, &v); err == nil {
t.mu.Lock()
t.env = append(t.env, v)
t.mu.Unlock()