Merge pull request #3900 from pdaig/fix-ssh-killed

Fix ssh process killed when context is done
This commit is contained in:
Sebastiaan van Stijn 2022-12-08 20:26:33 +01:00 committed by GitHub
commit 83ca73f9aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ func New(ctx context.Context, cmd string, args ...string) (net.Conn, error) {
c commandConn
err error
)
c.cmd = exec.CommandContext(ctx, cmd, args...)
c.cmd = exec.Command(cmd, args...)
// we assume that args never contains sensitive information
logrus.Debugf("commandconn: starting %s with %v", cmd, args)
c.cmd.Env = os.Environ()