int128 / gradle-ssh-plugin

Gradle SSH Plugin
https://gradle-ssh-plugin.github.io
Apache License 2.0
318 stars 60 forks source link

Cannot set inputStream to System.in #373

Open vitphire opened 3 years ago

vitphire commented 3 years ago

Environment info

gradle-ssh-plugin-2.10.1 (groovy-ssh-2.10.1, jsch-0.1.54, groovy-2.5.4, java-11.0.10)

Steps to reproduce

  1. Create a gradle project with the task described below (remoteName can be any remote that works)
  2. Run it
  3. I't runs forever, instead of finishing immediately
task runWithInput {
    doLast {
        ssh.run {
            settings {
                inputStream = System.in
            }
            session(remotes.remoteName) {
                execute "echo blablabla"
            }
        }
    }
}

If there is any other way to forward terminal input to the remote, that is what I'm looking for.