darkoperator / darkoperator/Posh-SSH

Invoke-SSHCommandStream only printing the first line

Open
#552 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PowerShell
Stars
1.1k
Forks
222
PR merge metrics
No merged PRs in 30d

Description

I noticed that Invoke-SSHCommandStream does not work correctly for some commands. For example:

apt list --upgradable

It will only print a part of the first line ("Listing...") and finish, but the output should be:

Listing... Done
docker-ce-cli/buster 5:24.0.7-1~debian.10~buster amd64 [upgradable from: 5:24.0.6-1~debian.10~buster]
docker-ce-rootless-extras/buster 5:24.0.7-1~debian.10~buster amd64 [upgradable from: 5:24.0.6-1~debian.10~buster]
docker-ce/buster 5:24.0.7-1~debian.10~buster amd64 [upgradable from: 5:24.0.6-1~debian.10~buster]
kubeadm/kubernetes-xenial 1.26.0-00 amd64 [upgradable from: 1.22.2-00]
kubectl/kubernetes-xenial 1.26.0-00 amd64 [upgradable from: 1.22.2-00]
kubelet/kubernetes-xenial 1.26.0-00 amd64 [upgradable from: 1.22.2-00]

I assume that it has something to do with how the apt command prints its output. If the behavior of Invoke-SSHCommandStream cannot be improved, it should be documented as a limitation.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Invoke-SSHCommandStream entry point and reproduce the issue with apt list --upgradable, comparing its streamed output with the expected complete listing. Determine whether the command's output can be streamed fully; done means the complete output is returned, or the limitation is documented if it cannot be improved.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.