Skip to content

Commit 281fb8d

Browse files
committed
fix(installer): detach noninteractive SSH input
1 parent 12ac6df commit 281fb8d

4 files changed

Lines changed: 7 additions & 6 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "opencode-ssh-image-paste"
3-
version = "0.1.2"
3+
version = "0.1.3"
44
edition = "2024"
55
description = "Paste Windows clipboard images into a remote OpenCode TUI over SSH"
66
license = "MIT"

bootstrap.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ try {
7171
Start-Sleep -Milliseconds 250
7272

7373
Write-Step "Testing SSH connection to $SshTarget"
74-
& ssh.exe -o BatchMode=yes -o ConnectTimeout=10 -- $SshTarget "echo ready"
74+
& ssh.exe -n -T -o BatchMode=yes -o ConnectTimeout=10 -- $SshTarget "echo ready"
7575
if ($LASTEXITCODE -ne 0) {
7676
throw "SSH connection failed. Configure a host key and non-interactive key or ssh-agent authentication first."
7777
}
7878

79-
$remoteArchitecture = (& ssh.exe -o BatchMode=yes -- $SshTarget "uname -m").Trim()
79+
$remoteArchitecture = (& ssh.exe -n -T -o BatchMode=yes -- $SshTarget "uname -m").Trim()
8080
if ($LASTEXITCODE -ne 0) {
8181
throw "Could not detect the remote architecture."
8282
}
@@ -104,11 +104,11 @@ try {
104104

105105
Write-Step "Installing Linux receiver ($remoteArchitecture)"
106106
$remoteTemporary = ".local/bin/$ProgramName.download"
107-
& ssh.exe -o BatchMode=yes -- $SshTarget "mkdir -p ~/.local/bin"
107+
& ssh.exe -n -T -o BatchMode=yes -- $SshTarget "mkdir -p ~/.local/bin"
108108
if ($LASTEXITCODE -ne 0) { throw "Could not create ~/.local/bin on the remote host." }
109109
& scp.exe -q -- $linuxDownload "${SshTarget}:$remoteTemporary"
110110
if ($LASTEXITCODE -ne 0) { throw "Could not upload the Linux receiver." }
111-
& ssh.exe -o BatchMode=yes -- $SshTarget "chmod 755 ~/$remoteTemporary && mv -f ~/$remoteTemporary ~/.local/bin/$ProgramName && ~/.local/bin/$ProgramName --version"
111+
& ssh.exe -n -T -o BatchMode=yes -- $SshTarget "chmod 755 ~/$remoteTemporary && mv -f ~/$remoteTemporary ~/.local/bin/$ProgramName && ~/.local/bin/$ProgramName --version"
112112
if ($LASTEXITCODE -ne 0) { throw "Could not activate the Linux receiver." }
113113

114114
Write-Step "Installing Windows client"

src/windows.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ pub fn doctor(config_path: Option<PathBuf>) -> Result<()> {
221221
.arg("BatchMode=yes")
222222
.arg("-o")
223223
.arg(format!("ConnectTimeout={}", config.request_timeout_seconds))
224+
.arg("-T")
224225
.arg(&config.ssh_target)
225226
.arg(&config.remote_probe_command)
226227
.stdin(Stdio::null())

0 commit comments

Comments
 (0)