shannot icon indicating copy to clipboard operation
shannot copied to clipboard

Stderr truncated thru uv wrapper

Open corv89 opened this issue 1 year ago • 1 comments

UV Tool Install Stderr Truncation

Symptoms

When installed via uv tool install, error messages may be truncated to only 2 lines instead of showing the full helpful error message with diagnostics and solutions.

Example:

$ shannot run ls /
ERROR shannot: Sandbox error: Sandbox command failed with exit code 1
Stderr: bwrap: setting up uid map: Permission denied
# Missing: detailed help about user namespaces, Ubuntu AppArmor, solutions, etc.

Root Cause

This is a known issue with the uv tool install wrapper where stderr output appears to be truncated. The enhanced error messages are present in the code but don't make it through the wrapper.

Workaround

Use the direct Python module invocation instead of the uv-installed wrapper:

# Instead of:
shannot run ls /

# Use:
python3 -m shannot.cli run ls /

This bypasses the UV wrapper and shows the full error messages with all diagnostic information and solutions.

Create an alias for convenience:

# Add to ~/.bashrc or ~/.zshrc
alias shannot='python3 -m shannot.cli'

Status

This appears to be specific to the uv tool install wrapper mechanism. The direct Python invocation works perfectly and is the recommended approach until this is resolved.

corv89 avatar Oct 20 '25 16:10 corv89

I think this has been resolved but if it resurfaces, the issue may be raised again

corv89 avatar Dec 23 '25 07:12 corv89