xonsh/xonsh
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
..
completers Use substring for env completion and better way to sort list (#5388) 2024-05-03 10:30:14 +02:00
history Make xonsh tolerant to inaccessible paths: history backend, script cache (#5430) 2024-05-20 21:14:14 +02:00
lib [pre-commit.ci] pre-commit autoupdate (#5271) 2024-01-30 12:23:50 +01:00
parsers chore: use stable 3.12 for CI jobs (#5307) 2024-05-16 15:43:57 +05:30
ply/ply refactor: remove non-source files from ply vendored (#4321) 2021-07-01 09:35:57 -04:00
procs Revert partial_proxy (#5445) 2024-05-27 18:00:15 +02:00
prompt Show `root and @#` in prompt if user is superuser. (#5409) 2024-05-22 09:27:03 -04:00
ptk_shell Saving history on SIGINT (#5425) 2024-05-22 10:20:08 -04:00
pytest Leverage sort for sorting items. (#5378) 2024-04-30 11:21:31 +02:00
virtualenv fix: update virtualenv activator (#5419) 2024-05-16 14:29:48 +05:30
webconfig refactor: update line length to default setting 2024-04-16 11:23:35 -04:00
xoreutils Fix 5379, 5429 (#5432) 2024-05-22 08:27:44 +05:30
__init__.py bumped version to 0.16.0 2024-04-23 14:34:31 -04:00
__main__.py black: the only color you need 2018-08-30 09:17:34 -05:00
aliases.py feat: add superhelp and additional context via new FuncAlias (#5366) 2024-05-13 09:11:58 -04:00
ansi_colors.py [pre-commit.ci] pre-commit autoupdate (#5271) 2024-01-30 12:23:50 +01:00
ast.py chore: use stable 3.12 for CI jobs (#5307) 2024-05-16 15:43:57 +05:30
base_shell.py [pre-commit.ci] pre-commit autoupdate (#5271) 2024-01-30 12:23:50 +01:00
built_ins.py Now last executed CommandPipeline is available in `__xonsh__.last` (#5422) 2024-05-22 09:25:35 -04:00
cli_utils.py Revert partial_proxy (#5445) 2024-05-27 18:00:15 +02:00
codecache.py Make xonsh tolerant to inaccessible paths: history backend, script cache (#5430) 2024-05-20 21:14:14 +02:00
color_tools.py [pre-commit.ci] pre-commit autoupdate (#5376) 2024-04-30 13:42:32 +02:00
commands_cache.py Added support of NixOS core tools in `predict_threadable` (#5440) 2024-05-24 16:51:25 -04:00
completer.py Use substring for env completion and better way to sort list (#5388) 2024-05-03 10:30:14 +02:00
contexts.py [pre-commit.ci] pre-commit autoupdate (#5271) 2024-01-30 12:23:50 +01:00
diff_history.py [pre-commit.ci] pre-commit autoupdate (#5271) 2024-01-30 12:23:50 +01:00
dirstack.py [pre-commit.ci] pre-commit autoupdate (#5271) 2024-01-30 12:23:50 +01:00
dumb_shell.py Remove globals (#4280) 2021-05-20 13:14:26 +03:00
environ.py Mitigate exception on start up if `dircolors` binary is broken (#5439) 2024-05-27 20:37:30 +02:00
events.py [pre-commit.ci] pre-commit autoupdate (#5271) 2024-01-30 12:23:50 +01:00
execer.py [pre-commit.ci] pre-commit autoupdate (#5271) 2024-01-30 12:23:50 +01:00
foreign_shells.py [pre-commit.ci] pre-commit autoupdate (#5271) 2024-01-30 12:23:50 +01:00
imphooks.py [pre-commit.ci] pre-commit autoupdate (#5271) 2024-01-30 12:23:50 +01:00
inspectors.py [pre-commit.ci] pre-commit autoupdate (#5376) 2024-04-30 13:42:32 +02:00
jobs.py Revert jobs.obj rename (#5442) 2024-05-25 07:34:26 +02:00
jsonutils.py [pre-commit.ci] pre-commit autoupdate (#5271) 2024-01-30 12:23:50 +01:00
lazyasd.py [pre-commit.ci] pre-commit autoupdate (#5271) 2024-01-30 12:23:50 +01:00
lazyimps.py [pre-commit.ci] pre-commit autoupdate (#5271) 2024-01-30 12:23:50 +01:00
lazyjson.py [pre-commit.ci] pre-commit autoupdate (#5271) 2024-01-30 12:23:50 +01:00
lexer.py refactor: update line length to default setting 2024-04-16 11:23:35 -04:00
macutils.py [pre-commit.ci] pre-commit autoupdate (#5271) 2024-01-30 12:23:50 +01:00
main.py Skip welcome if there is no TTY (#5414) 2024-05-15 03:18:19 +02:00
openpy.py [pre-commit.ci] pre-commit autoupdate (#5271) 2024-01-30 12:23:50 +01:00
parser.py [pre-commit.ci] pre-commit autoupdate (#5271) 2024-01-30 12:23:50 +01:00
platform.py feat(bashpath): add env-var to allow overriding path to bash (#5295) 2024-03-08 17:57:53 +01:00
pretty.py chore: use stable 3.12 for CI jobs (#5307) 2024-05-16 15:43:57 +05:30
pyghooks.py [pre-commit.ci] pre-commit autoupdate (#5376) 2024-04-30 13:42:32 +02:00
pygments_cache.py Fixed `xonsh -DVAR=VAL` behavior: initiate env variables before shell initialization. (#5396) 2024-05-06 17:39:10 +05:30
readline_shell.py fix(signals): fix processing exit signals and exit exception (#5399) 2024-05-13 09:31:55 -04:00
shell.py [pre-commit.ci] pre-commit autoupdate (#5271) 2024-01-30 12:23:50 +01:00
style_tools.py [pre-commit.ci] pre-commit autoupdate (#5271) 2024-01-30 12:23:50 +01:00
timings.py [pre-commit.ci] pre-commit autoupdate (#5271) 2024-01-30 12:23:50 +01:00
tokenize.py [pre-commit.ci] pre-commit autoupdate (#5376) 2024-04-30 13:42:32 +02:00
tools.py Read stop signals from the process and update the process state. (#5361) 2024-05-22 11:45:39 -04:00
tracer.py fix: trace help on empty args 2024-04-30 18:52:00 +05:30
winutils.py [pre-commit.ci] pre-commit autoupdate (#5271) 2024-01-30 12:23:50 +01:00
wizard.py refactor: update line length to default setting 2024-04-16 11:23:35 -04:00
xonfig.py Xonfig: show sensitive env variables that could affect the shell behavior. (#5374) 2024-05-02 22:46:22 +05:30
xontribs.py Fix argparser (#5421) 2024-05-16 16:31:05 +05:30