UniGetUI icon indicating copy to clipboard operation
UniGetUI copied to clipboard

[BUG] 3.1.0 Beta 1 - PowerShell - Write-Output : The term 'Write-Output' is not recognized as the name of a cmdlet, function, script file

Open RonnyTNL opened this issue 1 year ago • 5 comments

Please confirm these before moving forward

  • [X] I have searched for my issue and have not found a work-in-progress/duplicate/resolved issue.
  • [X] I have tested that this issue has not been fixed in the latest (beta or stable) release.
  • [X] I have checked the FAQ section for solutions.
  • [X] This issue is about a bug (if it is not, please use the correct template).

UniGetUI Version

3.1.0 b1

Windows version, edition and architecture

Win10 x64

Describe your issue

Package manager log shows error on PowerShell command.

Steps to reproduce the issue

Run 3.1.0 beta1 as standard/limited user

UniGetUI Log

N/A

Package Managers Logs

Logged subprocess-based task on manager Winget. Task type is ListPackages
Subprocess executable: "C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe"
Command-line arguments: "-ExecutionPolicy Bypass -NoLogo -NoProfile"
Process start time: 01/07/2024 16:49:00
Process end time:   01/07/2024 16:49:14

-- Process STDIN
 ...

-- Process STDOUT
 ...

-- Process STDERR
  Write-Output : The term 'Write-Output' is not recognized as the name of a cmdlet, function, script file, or 
  operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try 
  again.
  At line:1 char:1
  + Write-Output (Get-Module -Name Microsoft.WinGet.Client).Version
  + ~~~~~~~~~~~~~~~
      + CategoryInfo          : ObjectNotFound: (Write-Output:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
   

Return code: SUCCESS (0)

Relevant information

This error occurs 2 times in the log on the PowerShell commands. Task type is ListPackages Task type is ListUpdates

Screenshots and videos

No response

RonnyTNL avatar Jul 01 '24 14:07 RonnyTNL

This is due to some weird characters appearing on the parsed console. Don't worry about them, in fact, the Write-Output [...] line is present there so that it captures the ZWNBSP character and does not hinder the actual real commands, executed afterwards.

What I mean: image

I don't know yet what causes this character to appear, since in my machine this does not happen, but don't worry about it.

marticliment avatar Jul 01 '24 16:07 marticliment

Ok thanks, I'll give it a spin in a VM tomorrow see if I can reproduce this behavior.

RonnyTNL avatar Jul 01 '24 17:07 RonnyTNL

Reproduces on a VM also, perhaps regional settings or something?

RonnyTNL avatar Jul 02 '24 10:07 RonnyTNL

What are your regional settings?

marticliment avatar Jul 02 '24 10:07 marticliment

image

RonnyTNL avatar Jul 02 '24 10:07 RonnyTNL