xonsh/news/fix_dircolors.rst
Andy Kipp 1f5a7a816b
Mitigate exception on start up if `dircolors` binary is broken (#5439)
### Motivation

If `dircolors` utility is wrong by any reason you can't start xonsh
shell. This should not be stopper.

### Before

```xsh
cd /tmp
echo '#!/bin/qwe' > dircolors && chmod +x dircolors
echo '$PATH.append("/tmp")' > rc
xonsh --no-env --rc /tmp/rc
# OSError: [Errno 8] Exec format error: 'dircolors'
# Xonsh encountered an issue during launch
```

### After

It's working.

## For community
⬇️ **Please click the 👍 reaction instead of leaving a `+1` or 👍
comment**

---------

Co-authored-by: a <1@1.1>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-05-27 20:37:30 +02:00

23 lines
223 B
ReStructuredText

**Added:**
* <news item>
**Changed:**
* <news item>
**Deprecated:**
* <news item>
**Removed:**
* <news item>
**Fixed:**
* Prevent exception on start up if ``dircolors`` util is wrong.
**Security:**
* <news item>