PowerShell / PowerShell/PowerShell

`STDIN` is always corrupted in `com.termux.nix/files/home/.nix-profile/bin/pwsh`, and solely when `Start-Transcript` is active, in `org.kde.konsole.flatpakref`.

Open
#16,746 14 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

WG-Engine
Dominant language
C#
Stars
55.5k
Forks
8.5k
Avg merge
1d 2h
Merged PRs (30d)
88

Description

Prerequisites
Steps to reproduce
  1. #!/usr/bin/env sh
    sudo dnf --verbose --debugsolver install powershell-preview
    
  2. #!/usr/bin/env pwsh
    sudo dnf --verbose --debugsolver install flatpak
    flatpak -vv --ostree-verbose remote-add --installation=default --if-not-exists 'flathub' --from 'https://flathub.org/repo/flathub.flatpakrepo'
    flatpak -vv --ostree-verbose install    --installation=default --or-update     'flathub' 'runtime/org.kde.Sdk//5.15-21.08'
    flatpak -vv --ostree-verbose remote-add --installation=default --if-not-exists 'kdeapps' --from 'https://distribute.kde.org/kdeapps.flatpakrepo'
    flatpak -vv --ostree-verbose install    --installation=default --or-update     'kdeapps' 'app/org.kde.konsole//master'`
    flatpak -vv --ostree-verbose run        --installation=default --log-system-bus --log-session-bus --runtime='org.kde.Sdk' 'app/org.kde.konsole//master'
    
Expected behavior
[📦 org.kde.konsole /]$ /usr/bin/env /usr/bin/flatpak-spawn --host /usr/bin/env /usr/bin/pwsh -NoExit -Command 'Start-Transcript -Append -NoClobber -IncludeInvocationHeader'
Transcript started, output file is /home/BEEDELLROKEJULIANLOCKHART/PowerShell_transcript.fedora.8w0eKJsQ.20220113224917.txt
PS /> sudo dnf check-update
Failed to set locale, defaulting to C.UTF-8
Last metadata expiration check: 0:43:20 ago on Thu Jan 13 22:06:07 2022.
PS />
Actual behavior

STDIN is corrupted:

[📦 org.kde.konsole /]$ /usr/bin/env /usr/bin/flatpak-spawn --host /usr/bin/env /usr/bin/pwsh -NoExit -Command 'Start-Transcript -Append -NoClobber -IncludeInvocationHeader'
Transcript started, output file is /home/BEEDELLROKEJULIANLOCKHART/PowerShell_transcript.fedora.8w0eKJsQ.20220113224917.txt
PS /> ssusudsudosudo sudo dsudo dnsudo dnfsudo dnf sudo dnf csudo dnf chsudo dnf chesudo dnf checsudo dnf checksudo dnf check-sudo dnf check-usudo dnf check-upsudo dnf check-updsudo dnf check-updasudo dnf check-updatsudo dnf check-update
Failed to set locale, defaulting to C.UTF-8
Last metadata expiration check: 0:43:20 ago on Thu Jan 13 22:06:07 2022.
PS />
Error details
PS /> GGeGetGet-Get-EGet-ErGet-ErrGet-ErroGet-Error

It returns $Null.

Environment data
PS /> $$PSVe$PSVer$PSVers$PSVersi$PSVersio$PSVersion$PSVersionT$PSVersionTa$PSVersionTab$PSVersionTabl$PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.2.1
PSEdition                      Core
GitCommitId                    7.2.1
OS                             Linux 5.15.13-200.fc35.x86_64 #1 SMP Wed Jan 5 16:39:13 UTC 2022
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
Visuals

No response

Contributor guide

Open the contributing guide

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

Reproduce the issue in the reported pwsh environment, focusing on Start-Transcript with the Konsole Flatpak setup and the duplicated STDIN shown in the transcript. The report names no source file or test; done means interactive input remains uncorrupted while transcription is active and commands produce their normal output.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.