Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] stderr output suppressed on shell script shim #6112

Open
sitiom opened this issue Aug 19, 2024 · 1 comment · May be fixed by #6257
Open

[Bug] stderr output suppressed on shell script shim #6112

sitiom opened this issue Aug 19, 2024 · 1 comment · May be fixed by #6257
Labels

Comments

@sitiom
Copy link

sitiom commented Aug 19, 2024

Bug Report

The .cmd shim created by Scoop has a 2>nul redirect at the end which suppresses stderr output, breaking behavior on most scripts (ScoopInstaller/Main#6090 (review), ScoopInstaller/Main#6117 (review)). Example shim from neofetch:
image

Example command for reproduction: neofetch -v

Current Behavior

Error messages are not shown (called from the .cmd shim on PowerShell)
image

Expected Behavior

Error messages should be shown (Example from bash)
image

Additional context/output

It used to be working before, and the regression was introduced in a9ca75c.

Possible Solution

Perhaps a proper check of the wslpath and cygpath command first should work:

@rem C:\Users\rycae\scoop\apps\wcurl\current\wcurl

@bash -c "command -v wslpath >/dev/null 2>&1"

@if %errorlevel% equ 0 (
  @bash "$(wslpath -u 'C:\Users\rycae\scoop\apps\wcurl\current\wcurl')" %*
) else (
  @bash -c "command -v cygpath >/dev/null 2>&1"
  @if %errorlevel% equ 0 (
    @bash "$(cygpath -u 'C:\Users\rycae\scoop\apps\wcurl\current\wcurl')" %*
  ) 
)

System details

Windows version: 11

OS architecture: 32bit, 64bit

PowerShell version: 7.4.4

Additional software: WSL, Git

Scoop Configuration

{
    "aria2-warning-enabled":  false,
    "last_update":  "2024-08-19T15:35:17.7825723+08:00",
    "scoop_branch":  "master",
    "scoop_repo":  "https://github.com/ScoopInstaller/Scoop"
}
@maherm
Copy link

maherm commented Sep 6, 2024

Any updates on this?

@niheaven niheaven linked a pull request Dec 30, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants