Commit 7849acf
ci: use temp file for sftp batch commands instead of stdin pipe
sshpass works by forking the child with a PTY so it can intercept SSH's
password prompt. Piping commands into sshpass via | replaces its stdin,
breaking the PTY-based password injection.
Instead, write the sftp batch commands to a mktemp file and pass it with
-b "$SFTP_BATCH". This leaves sshpass's stdin untouched so the PTY works
correctly, while sftp reads its commands from the temp file.
Co-authored-by: igaw <[email protected]>1 parent 40ff69c commit 7849acf
1 file changed
Lines changed: 8 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| |||
0 commit comments